Quarkus Desktop
Quarkus Desktop brings AWT, Swing and SWT desktop (GUI) applications to Quarkus, in JVM mode and as GraalVM native executables.
The Quarkus core extension io.quarkus:quarkus-awt supports headless Java2D, ImageIO and fonts, which server side
applications need. The Desktop AWT and Desktop Swing extensions build on it (they include it) and add what GUI
applications need: windows, printing, data transfer, input methods, sound, accessibility, and Swing. The Desktop SWT
extension brings Eclipse SWT applications, with the native widgets of Windows, GTK and
macOS: it does not need AWT.
Installation
Add one of the extensions to your build file. quarkus-desktop-swing includes quarkus-desktop-awt;
quarkus-desktop-swt does not depend on them.
AWT
<dependency>
<groupId>io.quarkiverse.desktop</groupId>
<artifactId>quarkus-desktop-awt</artifactId>
<version>1.0.0</version>
</dependency>
implementation("io.quarkiverse.desktop:quarkus-desktop-awt:1.0.0")
Swing
<dependency>
<groupId>io.quarkiverse.desktop</groupId>
<artifactId>quarkus-desktop-swing</artifactId>
<version>1.0.0</version>
</dependency>
implementation("io.quarkiverse.desktop:quarkus-desktop-swing:1.0.0")
SWT
<dependency>
<groupId>io.quarkiverse.desktop</groupId>
<artifactId>quarkus-desktop-swt</artifactId>
<version>1.0.0</version>
</dependency>
Maven adds the SWT jar of the platform of the build (org.eclipse.platform:org.eclipse.swt.<ws>.<os>.<arch>) through
the profiles of the org.eclipse.platform:org.eclipse.swt pom. Gradle does not apply them: add the SWT jar of the
platform yourself, for instance on Windows x64:
implementation("io.quarkiverse.desktop:quarkus-desktop-swt:1.0.0")
implementation("org.eclipse.platform:org.eclipse.swt.win32.win32.x86_64:3.135.0")
See Installation for a Gradle build that chooses the jar from the platform of the build, and SWT versions for other SWT releases.
Supported platforms
AWT and Swing applications:
| Platform | JVM mode | Native executable |
|---|---|---|
Windows x64 |
Yes |
Yes: a native build on Windows, with Visual Studio (the C++ build tools). The executable is DPI aware, has the visual styles of Windows, can be a GUI application without console, and comes with the JDK libraries and the Visual C++ runtime it needs (see Windows). |
Windows arm64 |
Yes |
No: GraalVM has no native image builder for Windows on arm64. |
Linux x64 and arm64 |
Yes |
Yes: a native build on Linux or in a container. The executable uses the X11 libraries of the system (XWayland on Wayland), GTK 3 for the GTK look and feel and the native dialogs, CUPS and ALSA (see Linux). |
macOS (Apple silicon) |
Yes |
Yes, with Quarkus 4.0.0.Beta1 or later, whose |
Native executables need GraalVM for JDK 25 and Quarkus 4.0.0 or later (on macOS: GraalVM 25.1 or later, and Quarkus 4.0.0.Beta1 or later).
SWT applications (see Platforms of Desktop SWT):
| Platform | JVM mode | Native executable |
|---|---|---|
Windows x64 |
Yes |
Yes: a native build on Windows, with Visual Studio (see Windows). |
Linux x64 and arm64 |
Yes |
Yes: a native build on Linux or in a container, with GTK 3 at run time (see Linux). |
macOS (Apple silicon) |
With |
Yes: the event loop runs on the first thread of the process (see macOS). |
Windows arm64 |
Yes |
No arm64 executable: GraalVM has no native image builder for Windows on arm64. An x64 executable, built with an x64 GraalVM under the x64 emulation of Windows, runs there under emulation (see Windows). |
Guides
-
Desktop AWT: how the extensions work, writing a desktop application, and building native executables.
-
Desktop Swing: look and feels, text, Synth, and what Swing applications need in native executables.
-
Desktop SWT: SWT applications in JVM mode and as native executables, and their application model: the startup and the exit of the user interface, the user interface thread (
UiThreadExecutor,UiThread,@RunOnUiThread),WidgetBeans, quit requests, dev mode and tests. -
Application model and CDI (AWT and Swing): windows as CDI beans, the startup and the exit of the user interface, the event dispatch thread (
EdtExecutor,Edt,@RunOnEdt), the application menu, Finder and Dock events of macOS, dev mode and tests.
Configuration
The properties are fixed when the native executable is built and only apply to native executables (JVM mode uses the
java launcher and the JDK as they are), except the run time properties of the application model
(quarkus.desktop.awt.startup-event.*, quarkus.desktop.awt.exit-on-last-window-closed, and for SWT
quarkus.desktop.swt.startup-event.enabled, quarkus.desktop.swt.exit-on-last-shell-closed and
quarkus.desktop.swt.application-name) and quarkus.desktop.swing.look-and-feel, which also apply in JVM mode.
| Property | Default | Description |
|---|---|---|
|
|
Whether |
|
|
|
|
|
The application stops when its last visible window closes, see Closing windows and exit. |
|
|
The bean properties of the AWT classes for the JavaBeans API (about 0.3 MB), see JavaBeans. |
|
detected |
The lookups for native executables built with |
|
|
Windows: the executable scales its user interface to the display, as the |
|
|
Windows: the application manifest of the |
|
|
Windows: |
|
|
Windows: copies the Visual C++ runtime next to the executable. |
|
|
Windows: the font configuration of the JDK (all the languages), or |
|
|
Windows: the Java Access Bridge for screen readers. |
|
|
macOS: the first thread runs the Cocoa event loop, the application runs on a new thread named |
|
|
macOS: the stack size of that |
|
|
macOS: how long |
|
|
macOS: the name of the application in the menu bar and the Dock. |
|
|
macOS: embeds an information property list in the executable. |
|
|
macOS: the executable declares the minimum macOS version and SDK version of the |
|
The look and feel set at startup ( |
|
|
|
The look and feels of the JDK included in the executable (about 10 MB for all of them). |
|
|
The bean properties of the Swing classes for the JavaBeans API (3 to 4 MB), see JavaBeans. |
|
|
Whether the SWT user interface runs ( |
|
|
The application stops when its last visible shell closes, see Closing shells and exit. |
|
|
The name of the application given to SWT ( |
|
|
The native libraries of SWT: embedded in the executable (SWT extracts them on the first run), or
|
|
|
Windows: |
|
|
macOS: the executable declares the minimum macOS version and SDK version of the |
See the configuration reference for the details.