r/java • • Sep 28 '26

State of Java Desktop

Thinking about local-first, desktop applications. https://sombriks.com.br/blog/0097-state-of-java-desktop/

83 Upvotes

59 comments sorted by

View all comments

1

u/SpicyRomek 2d ago

Disclosure: I work at Vaadin.

If you want "no install, just a link" without running Java in the browser, Vaadin's SwingBridge does the opposite of CheerpJ. The Swing app keeps running unchanged on a server JVM. SwingBridge streams only the changed screen regions to the browser and replays clicks and keystrokes on the real Swing components. So there's no client-side JVM or WASM, and no rewrite. It also runs NetBeans Platform apps.

Because the Swing app is hosted inside a Vaadin app, you can then replace views one at a time with Vaadin views written in Java, and call between the old and new code. It's a bit like what u/bfoo described doing with JavaFX inside Swing, except you end up on the web.

Trade-offs, so nobody's surprised:

  • It needs a server and a network connection, so it doesn't fit the local-first case the article is about.
  • Every user's Swing app runs in the server JVM, so memory grows with the number of users.
  • Swing apps assume one user per process, so things like local file access or serial devices need refactoring before many people can use it at once.
  • It's a commercial part of Vaadin (there's a free trial), not the Apache 2.0 core.

Docs if anyone wants to poke at it: https://vaadin.com/docs/latest/tools/modernization-toolkit/swing-bridge

1

u/alexp_lt 2d ago

Disclosure: lead developer of CheerpJ and CTO of Leaning Technologies

> So there's no client-side JVM or WASM, and no rewrite

Just wanted to make sure no confusion is created here, CheerpJ does not require _any_ rewrite of the original application. It actually works from unmodified JARs.

Moreover, WASM (WebAssembly) is a standard feature of Web platform and work fully within the established security model of the browser. Although CheerpJ can (and should) be considered a client-side JVM it is nevertheless "just" a very complicated JavaScript/WebAssembly library. As such it does not impact the security profile of the user device like a native client JVM would do.