r/java • • Feb 18 '26

Swing Modernization Toolkit — run Swing apps in the browser, then migrate view-by-view. Anyone planning to try this?

Vaadin recently released a Swing Modernization Toolkit: a tool to migrate your swing app to the web in minutes.

It's a two-phase approach:

  1. Run your existing Swing app in the browser (server-side JVM, rendered to a browser client). Automatically and in minutes or hours, not days or months.
  2. Incrementally replace Swing views with web views, screen by screen, all in Java: no JS/TS coding needed.

We've talked to hundreds of people maintaining SWING apps, and the challenge is almost always that "They are important and get the job done", but "lack true cloud deployment, mobile support, and modern UIs". Also Swing developers aren't getting any younger ;)

Do you have a Swing app that's important to your business? Does the above story resonate? Interested in trying it out? What other "strategies" or tools have you used or considered? Is there other tech you'd like to modernize to the web? JavaFX? JSF?

Looking for genuine feedback!

More info at https://vaadin.com/swing

​DISCLAIMER: I've worked at Vaadin since 2008.

30 Upvotes

15 comments sorted by

4

u/robintegg Feb 18 '26

As you say there are projects that can provide web views within a swing app such as JxBrowser and JCEFMaven. These embed chromium so you get the full web platform support within the swing app and can let you leverage web frameworks.

A direct migration to vaadin also sounds pretty good if that’s your final destination of web framework

10

u/SpicyRomek Feb 18 '26

slight correction, JxBrowser/JCEF solve the opposite problem actually. They embed a browser inside your Swing app. This puts your Swing app inside the browser as far as I understand. Different direction entirely depending on what you need.

1

u/robintegg Feb 18 '26

Sure. That’s what I was getting at for a swing migration approach. Add the web view to your swing app and migrate your views to web views presented in your swing app until there’s none left, the it should be a short jump to presenting it all via the web.

4

u/EfficientTrust3948 Feb 18 '26

We have had that as an option with Vaadin for several years already but it's not very popular. I think the main challenge is that you get to the main benefit of simpler distribution only at the very end whereas you have to live with a little bit of additional complexity for the whole time.

2

u/jeffreportmill Feb 18 '26

It’s hard to believe that they have even 90% coverage of Swing and JRE APIs. Has anyone actually tried it?

1

u/jeffreportmill Feb 18 '26

Google AI actually says, "The Vaadin Modernization Toolkit includes a transpiler that can automate the conversion of up to 85% of method calls from Swing to the modern Vaadin Flow framework, but it is a migration to a new UI API, not a runtime emulation of the original."

It sounds like heroic work, but it would be even cooler if Vaadin formed a partnership with CheerpJ and made this much easier with better coverage. I wonder if the OP knows if Vaadin has ever looked into this?

4

u/Fjallvind Feb 18 '26

CheerpJ mentioned in a recent blog (not this exact topic though): https://vaadin.com/blog/extending-vaadins-pure-java-experience-to-the-browser

It’s a quite fundamentally different solution though, Vaadin does not execute java in the browser, it’s run on an actual jvm on the server.

→ More replies (1)
→ More replies (1)

2

u/mnbkp Feb 19 '26

a comparison with cheerpj and webswing would be very interesting

1

u/davidheddle Feb 21 '26

How much of a sandbox will your app run in? For example, can you see the local file system?

2

u/EfficientTrust3948 Feb 22 '26

The web browser is the sandbox.

You can't see the end user's file system but basic JFileChooser use is mocked as file uploads and downloads in the browser. 

Could in theory also do something around the File System Access API that is so far only available in Chrome if there's a clear user demand.