Vaadin 24.4 integrates with React, unifies Flow and Hilla development, and more!

Clock ticking loudly for Swing and SWT users

Ben Wilson
Ben Wilson
On Nov 1, 2017 6:00:00 AM

It might have flown under your radar, but with the release of Java 9, Oracle delivered the biggest wakeup call yet to Swing users. While Swing remains supported within JavaSE, the options are running out to get your Swing applications to your users’ desktops and to keep these applications updated. The release notes for Java 9 give mixed signals on the future for deployment options for Java desktop applications, and as you might guess, the worst news is in the finest print.

The large print can be found on the Java Platform, Standard Edition Deployment Guide which reviews the familiar options of JNLP, Web Start and Self-Contained Application Packaging. What shouldn’t come as a surprise is the continued advice to migrate Java Applets to Java Web Start and JNLP. Migration of Applets to Web Start was recommended already in Java 8 in the technotes.

Most have likely seen this coming - as more and more browser vendors remove NPAPI plugin support, it doesn’t really matter if Java supports its plugins or not. The deprecation was announced well in advance in JEP 289 and various blog posts. As we were warned years ago, the Java Plug-In that enables Applets is now “available” but “deprecated” in JDK 9 and the Applet API is deprecated. In the JDK 9 whatsnew documents they mention twice that developers should “consider rewriting applets as Java Web Start or self-contained applications.”

It pays to whip out your microscope and comb through the finer print of the JDK 9 release notes because the advice to migrate to Java Web Start turns out to be actually false. On the Deprecated APIs, Features, and Options page they write:

“Java Deployment Technologies are deprecated and will be removed in a future release. Java Applet and WebStart functionality, including the Applet API, The Java plug-in, the Java Applet Viewer, JNLP and Java Web Start including the javaws tool are all deprecated in JDK 9 and will be removed in a future release.”

Why would you migrate Applets to Web Start if Web Start is also deprecated? This isn’t good advice.The deprecation announcement is crucial information for applet and desktop application users to bear in mind as they consider their options.

The deprecation announcement really doesn’t leave much open in the way of long-term options from the SE Deployment Guide. The only packaging option still remaining for non-JavaFX Java desktop applications is self-contained application packaging and figure-it-out-yourself deployment. But self-contained application packaging involves a whopper of a bundle of both the application and the JRE needed to run it, and these packages are platform specific.

Making matters worse, with self-contained application packages comes the added drawback of not having built-in support for application updates. With web-based application deployment you get support for ensuring your users always and automatically access the latest version of the deployed application. With nothing more than a package, you need to figure out yourself how to get it on the user’s desktop.

So with Java 9, it appears Java has begun a retreat from the desktop, both from desktop operating systems and from desktop browsers. This is a profound development with serious implications for desktop Java users. Any companies with Swing or SWT deployed need to get moving with their migration plans to move to server-side Java and HTML5.

Vaadin is the perfect tool for enabling just such a move, and many companies have successfully leveraged Vaadin for their Swing migration. Find out more from our resources and documents or case studies, or contact our migration experts who can give you advice on how to get started.


Contact us

Ben Wilson
Ben Wilson
Ben joined Vaadin in 2016 after specializing many years in the automated modernization of large enterprise applications. Ben works in the Berlin office and is always looking for ways to salvage parts of old software to construct new, cutting-edge applications.
Other posts by Ben Wilson