Swing/JavaFX
Application Setup
Swing and JavaFX applications are configured in json format and by default are saved in file webswing.config
, which is by default placed in the same folder as the webswing-server.war
file. This location may be changed using the -c
command-line option. It is recommended to use the Administration console form based configuration screen to modify this file to avoid JSON formatting problems.
Configuration using Admin Console
The easiest way of configuring your application is using the Admin console. To access the Admin console click Manage from Webswing homepage or go to the admin console URL that you have configured in your webswing.config
file under root ("/") path.
Navigate to the Configuration view where you can see the list of configured applications. You can add new or edit existing applications here.
You can edit or view the settings. These are split in logical sections. Each setting has a description, which is displayed when hovered on the question mark.
To configure a Swing or JavaFX application choose Desktop
as Launcher Type
, specify your Main Class
and arguments if needed. Don't forget to configure also Java
and Class Path
.
JavaFX
If you want to run your JavaFX application with Webswing, download the required JavaFX libraries here - https://mvnrepository.com/artifact/org.openjfx and add them to the javaFxClassPathEntries
in app configuration. Webswing supports JavaFX versions 8, 11, 17 and 21. You can also use a JDK that has JavaFX libraries included. In such case set the configuration option javaFxEmbeddedInJdk
to true
, then you don't have to provide javaFxClassPathEntries
or javaFxVersion
.