Goldberry
Goldberry 2026.3

Desktop apps in Java

Build your interface in Java or KDL. Edit the markup and CSS while your app runs.

JDK 25+ Linux, macOS and Windows Apache 2.0

The Showcase window with a daily line and bar chart and a chart with two series
Browse the Showcase

Components and tools

Component guide

Live KDL and CSS

Bind KDL screens to fields and actions on Java models. Edit markup and CSS while the window stays open. Use flexbox and container queries for layout.

UI tests without a display

Use Offscreen in JUnit to click a control by role and name, step an animation with a virtual clock, and compare the rendered frame with a reference screenshot.

JVM and native builds

Run the app on Java 25 or ship it as a GraalVM executable for each target. The weaver binds the same Java models at build time for the native image.

CPU painting and GPU layers

Blend2D paints widgets on the CPU. Add a canvas3d layer to draw a scene on the GPU and place ordinary controls over it.

Editors and documents

Render Markdown and HTML as Goldberry widgets. Add rich text fields with mentions and optional Hunspell spelling, and use SVG views that take their colour from CSS.

Media playback and capture

Play audio and video, preview a camera feed, and display a live waveform or spectrum. Use synthetic camera and microphone sources in tests.

Inside the Showcase

Browse screenshots from the example app shipped with Goldberry.

Get the app

Add Goldberry

Use the BOM to keep module versions in sync. Add a natives classifier for each platform your app will run on. The Maven example uses Linux x64.

Installation guide
repositories {
    mavenCentral()
}

dependencies {
    implementation platform('dev.goldberry:goldberry-bom:2026.3')
    implementation 'dev.goldberry:goldberry'
    runtimeOnly 'dev.goldberry:goldberry-natives::linux-x64'
    runtimeOnly 'dev.goldberry:goldberry-natives::linux-aarch64'
    runtimeOnly 'dev.goldberry:goldberry-natives::macos-aarch64'
    runtimeOnly 'dev.goldberry:goldberry-natives::windows-x64'
}

Open a window

Run this class on a JDK 25 or later. Enable native access for the launcher and pass -XstartOnFirstThread on macOS.

Hello.java

import dev.goldberry.Goldberry;
import dev.goldberry.Window;

public class Hello {
    static void main() {
        var window = Window.open("Hello, Goldberry", 480, 320);
        window.onPaint(frame -> frame.fill(0xFF2E3440));
        Goldberry.run();
    }
}

KDL and CSS

KDL describes the widget tree and names actions on your Java model. CSS handles flexbox layout, colours and transitions, with support for nesting, cascade layers and container queries.

Styling guide

Nord themes

Switch between the built-in light and dark themes at run time. Both share the same spacing, type scale and control sizes.

Design system
row {
    spacer
    button press="dismiss" "Cancel"
    button class="danger" press="delete" "Delete"
}

JVM and native executables

Native image guide
DeploymentJVMGraalVM native image
What you shipApplication and dependency jars, including native classifier jarsOne executable per target platform
What users needJDK 25 or later and the target platform’s system librariesThe target platform’s system libraries
Binding Java modelsAt run time using annotationsAhead of time with the Goldberry weaver
Build toolsGradle or Maven on a JDK 25 or laterGraalVM for JDK 25 and a native toolchain

Performance

Linux Showcase runs and raster benchmarks from the performance guide.

Measurements and methods

Time to first frame

  • 519 ms
    Native image

    Median across seven launches

  • 1,340 ms
    JVM with a JDK 25 AOT cache

    Median across five launches

  • 1,980 ms
    Cold JVM

    Median across five launches

Frame and paint costs

  • 3.13 ms
    Median frame time

    960 × 640 window with wrapped text

  • 2.3 ms
    Full 4K raster

    3840 × 2160 across four paint workers

  • 117 µs
    Repaint one change

    One small box updated at 960 × 640

Do I need GraalVM?

A JDK 25 or later can run a Goldberry app. Use GraalVM if you want to ship a native executable that runs without a JDK.

Which desktop systems can I target?

The toolkit ships native libraries for Linux x64 and ARM64, macOS on Apple silicon, and Windows x64. On Linux it supports Wayland and X11.

Does Goldberry need a GPU?

Goldberry can paint and present on the CPU. With goldberry-gpu, windows can present through the GPU and apps can draw into a canvas3d layer.

Can I test an app without opening a window?

Yes. An Offscreen session in JUnit can find a widget by ID or by role and name, drive input, advance a virtual clock and compare the rendered image with a reference.

What accessibility support does it have?

Widgets support keyboard navigation, focus indicators and a semantics tree. A bridge to platform screen readers is still on hold.

Releases

All releases
  1. Goldberry 2026.3

    Goldberry adds rich text editing, optional spell checking and SVG rendering. New modules handle camera and microphone capture. This release also adds CSS nesting, a new media engine and a Gradle plugin for ahead-of-time binding.

    Upgrading from 2026.2? Update your native classifier jars and check the media dependency changes. Upgrade notes

  2. Goldberry 2026.2

    The first release brought KDL with hot reload, CSS and flexbox, and desktop builds for Linux, macOS and Windows.

Download Goldberry Showcase

Version 2026.3 runs without a JDK. Extract the archive on Linux and macOS, or run the .exe on Windows.