Bring an existing Java Swing application to the browser. Learn how to start Webswing, configure your application and validate the workflows your users rely on.
You can run a Java Swing application through a web browser by hosting it with Webswing. The application continues to execute in a JVM on the server; users interact with its interface through their browser. They do not need a Java runtime or browser plugin on their own devices. The Webswing architecture overview explains how rendering and input travel between the application and the browser.
This guide takes an existing Swing application from its build files to a first browser session, then shows what to test before a wider rollout. The setup follows the standard Webswing 26.1 distribution on Windows. For other deployment environments, start with the corresponding section of the installation guide.
How Java Swing runs in a browser
Webswing displays the application through HTML5 and sends keyboard and mouse input back to the Java process. Java executes on the server. Browser delivery therefore preserves the application’s Java implementation; it does not convert the project into JavaScript or automatically redesign its screens.
Step 1 Prepare the application and its dependencies
Start with a build that already works outside Webswing. Keep the application JAR, its required libraries and configuration files together. Record the main class, Java runtime and startup arguments used for a successful desktop launch.
Choose a representative task for the trial, such as opening a record, editing a value, saving it and exporting a report. Note the expected result and any dependency on local files, printers, native libraries or external services. This gives you a specific workflow to validate after configuration.
Step 2 Start Webswing locally
Get the evaluation distribution from Webswing Downloads. For this example, extract it to C:\webswing. Install a Java runtime supported by your chosen release and check it against the installation requirements.
On Windows, open Command Prompt in the extracted folder and run the following commands. The Windows startup instructions confirm the script name:
java -version
webswing.bat
Open http://localhost:8080 in your browser and sign in using the credentials configured for the distribution. For an unchanged local evaluation, the Quick Start Guide documents its initial login. Use those credentials only for the local trial and configure access before exposing the service to other users.
Select Manage to open the Admin Console. If your evaluation package includes example applications, launching one first can help establish that the basic installation starts correctly.
Step 3 Add and configure your Swing application
In the Admin Console, open Applications, select the plus icon and choose Create New. Enter a name and a URL path, such as /myapp, then submit. The Quick Start Guide also offers a wizard; manual setup makes the key settings explicit.
Open the application’s App Config. Use the following fields, as documented in Swing configuration and the configuration reference:
For the documented CelsiusConverter example, the JAR is CelsiusConverter.jar and the main class is learn.CelsiusConverterGUI. With the JAR in C:/webswing, set that directory as Home Folder when using the relative JAR name. Replace these example values with your own application’s details.

Select Apply, then Enable. Open the path you configured, for example http://localhost:8080/myapp. The first checkpoint is a usable application window, followed by the representative task you selected in Step 1.
Field | What to enter |
Launcher Type | Desktop for a Swing application. |
Home Folder | Directory used to resolve relative classpath entries. |
JRE Executable and Java Version | Java executable on the host, with its matching version. |
Class Path | Application JAR or classes directory and required libraries. |
Main Class | Fully qualified entry class, including its package name. |
Main Arguments | Application arguments, if required. |
Step 4 Check the workflows that matter
Use representative test data and compare the browser result with the desktop result. Include the following checks where they apply:
- Navigation and data: complete the task, trigger a validation message and check that saving, cancelling and keyboard shortcuts behave as expected.
- Files: test an actual import and export. The Java application uses the server filesystem; file handling integration provides browser upload and download through JFileChooser. Review custom file workflows separately.
- Printing: generate and inspect a real report. The documented printing integration produces a PDF for the browser. Test specialist printers and any required direct-printing behaviour explicitly.
- Sessions and load: test a second user, the intended permissions and reconnection behaviour. Repeat representative tasks with the expected concurrent users while observing response time and server resources.
If the application does not start correctly
Open Logs in the Admin Console and inspect the server or application messages. Check these items against the application’s known working launch:
Class loading: confirm the main class name and the JARs in Class Path. Java: verify the executable and matching version. Paths: check Home Folder for relative classpath entries and Working Directory for the process’s working location.
Plan rollout and further modernisation
Before production, configure access and HTTPS, size the environment from measured use and review the applicable Webswing licence. Keep a record of the build and configuration that passed your workflow checks.
Browser delivery gives users a new way to access existing software. It does not remove all technical debt. Use the Modernisation Framework to choose where to add web features, refresh the interface or rebuild a module. Web-Enable, Extend, Facelift and Rebuild are complementary options that can be combined.
Common questions
Do users need Java installed on their devices?
No. Users access Webswing through a browser. Java is required on the host that runs the application.
Can the same approach be used for JavaFX?
JavaFX also uses the Desktop launcher, with additional JavaFX configuration. Follow the Swing and JavaFX setup guide for the libraries and settings required by your environment.
Is every desktop workload a good fit?
Check your workload against the documented limitations, particularly multimedia, hardware-accelerated 3D and applications that depend on very low interaction latency.
Start with one application and one complete workflow. Download Webswing for an evaluation, or contact the team with your Java version, application framework and integration requirements.
