Requirements and Configuration
This page covers what a NetBeans Platform guest needs on top of a standard SwingBridge setup: how the distribution is discovered, the additional JVM flags, and the system properties that control embedding.
Requirements
-
A pre-built NetBeans Platform distribution — the directory the platform’s own launcher would run. It must contain at least
etc/<branding>.clustersandplatform/lib/boot.jar, alongside the branding cluster and the feature module clusters. Bare.nbmfiles without a host application are not supported. -
JDK 21. NetBeans Platform 25’s
TopSecurityManagerdepends on classes removed in JDK 24 and later; embedding on a newer JDK requires a NetBeans Platform variant that has dropped that dependency. -
The standard SwingBridge runtime setup — the
--patch-module/-Xbootclasspath/aflags,java.awt.headless=false, a valid license, and server push (@Push). See Installation from Scratch.
Cluster Discovery
SwingBridge locates the NetBeans Platform distribution using the same convention ladder plain Swing guests use for their JARs. The first source that yields a valid distribution wins:
| Order | Source | Notes |
|---|---|---|
1 |
| Explicit override. Useful for power users and CI. |
2 | Directory entries in | The same file plain Swing guests use. Entries that are directories (not JARs) are treated as candidate distributions. See Using |
3 | The | Resolved exactly as for plain Swing guests ( |
A directory qualifies as a distribution only when it contains both etc/<branding>.clusters and platform/lib/boot.jar; the branding token is the basename of the .clusters file. If no source yields a valid distribution, startup fails with a message that names all three sources, so you know which levers are available. Discovery runs once per JVM and the result is reused across sessions.
|
Note
|
A frequent mistake is listing the distribution’s individual JARs in |
NetBeans JVM Flags
A NetBeans Platform guest needs a few JVM flags beyond the standard SwingBridge runtime set documented in JVM Flags Reference. Add these to the <jvmArguments> of the spring-boot-maven-plugin, together with the standard set:
Source code
--add-opens=java.base/java.lang=ALL-UNNAMED
--add-opens=java.desktop/javax.swing=ALL-UNNAMED
--add-opens=java.desktop/javax.swing.text=ALL-UNNAMED
--add-opens=java.base/java.net=ALL-UNNAMED
--add-opens=java.base/java.security=ALL-UNNAMED
-Djava.security.manager=allow| Flag | Purpose |
|---|---|
| Required. Lets SwingBridge give each tenant a thread group that reports itself as a JVM root, so NetBeans’s |
| Required. NetBeans Platform 25 installs a |
| Reflective access the platform performs into Swing internals during boot and rendering. |
| Reflective access the platform’s module system and networking layers perform during boot. |
|
Important
|
These flags apply to the runtime JVM only. The compile-time |
System Properties
In addition to the SwingBridge system properties (see System Properties Reference), the following applies to NetBeans Platform guests:
| Property | Default | Description |
|---|---|---|
| — | Absolute path to the NetBeans Platform distribution directory. Highest-priority discovery source; overrides |
The per-tenant --userdir, --cachedir, --branding, and look-and-feel arguments are derived and managed automatically per session; they are not configured by hand.
Look and Feel
The bridge resolves the look-and-feel from the distribution’s etc/<branding>.conf file — the --laf <class> token in its default_options line — and falls back to com.formdev.flatlaf.FlatLightLaf when the file is missing or specifies no look-and-feel. Because each session’s frames are rendered into an HTML canvas with no native window, the bridge also transparently handles two platform-default behaviors that don’t apply to offscreen rendering: it keeps the main menu bar painted in-window on macOS, and it disables FlatLaf’s native window library on Windows. No configuration is required for either.