Configuration
This page lists the runtime knobs SwingBridge reads from JVM system properties, plus the in‑page error view that activates when the embedded Swing application fails to launch.
System Properties Reference
| Property | Default | Description |
|---|---|---|
| — | Required. Must be set to |
|
| Override the directory SwingBridge scans for application JARs. See Using the |
| JVM working directory ( | Base directory used to resolve relative paths in |
|
| How often SwingBridge polls each Swing window for changes and pushes the dirty regions to the browser. Lower values feel more responsive at the cost of CPU; higher values save CPU at the cost of perceived latency. |
|
| When set to |
For Spring Boot, set system properties through <systemPropertyVariables> on the spring-boot-maven-plugin (see Project Setup) or pass -D flags on the command line. For a packaged JAR, pass them with -D on the command line:
Source code
terminal
java -Dswingbridge.errorReporting.enabled=false -jar my-app.jarLaunch Failure Error View
When a Swing application embedded via [classname]`SwingBridge` fails to start — for example because the configured main class cannot be loaded, the AWT toolkit cannot initialize, or no JFrame becomes visible within the launch timeout — the canvas area is replaced with an in-page error view that shows:
-
A failure title and a short explainer.
-
The error type and message.
-
The full stack trace, including any
Caused bychain (collapsible). -
An optional email field and a Submit report button that posts a report to Vaadin so the cause can be investigated.
-
A Preview report content button that opens a draggable, resizable dialog showing the exact JSON that would be submitted (with the stack trace rendered as plain text in a separate section).
-
A link to the Vaadin Privacy Policy explaining how reports are processed.
The intent is that a developer integrating SwingBridge sees a meaningful error in the browser instead of a blank canvas.
Disabling for Production
Set swingbridge.errorReporting.enabled=false to suppress all exception details in the error view. Only the Failed to launch the Swing application header is shown; the message, stack trace, email field, and submit button are all hidden so that no diagnostic information leaks into the page or onto a report endpoint. Diagnose the cause from server-side logs instead.
For a Spring Boot run, add the flag to the <jvmArguments> in spring-boot-maven-plugin. For a packaged JAR:
Source code
terminal
java -Dswingbridge.errorReporting.enabled=false -jar my-app.jar|
Important
|
Stack traces can contain customer data (file paths, hostnames, query parameters). Disable error reporting in any deployment where this information must not reach end-users or third parties. |