The clock is ticking: The Java browser plugin will be deprecated soon
Sleepy young man covering ears with pillow image via Shutterstock
Oracle announced in a post published last year that they plan to deprecate the Java browser plugin in JDK 9. Since JDK 9 should be coming in July, it’s imperative that developers find an alternative.
The fact that the General Availability (GA) milestone of JDK 9 has been moved to July 2017 may have offered an advantage to developers who still relied on the Java plugin technology in the 32-bit Mozilla Firefox web browser but that ship is about to sail.
Oracle announced in a recent blog post that starting with Mozilla Firefox 52, which will be released next month, the 32-bit version of Mozilla Firefox “will no longer provide the requisite APIs for standards based plugin support. Therefore, developers and users still relying on the Java plugin technology in the 32-bit Mozilla Firefox web browser should consider migrating to a different solution.”
“Supporting Java in browsers is only possible for as long as browser vendors are committed to supporting standards based plugins,” Oracle announced in a whitepaper published in January 2016.
By late 2015, many browser vendors had either removed or announced timelines for the removal of standards based plugin support, while some are introducing proprietary browser-specific extension APIs. Consequently, Oracle is planning to deprecate the Java browser plugin in JDK 9.
What are the alternatives to the Java browser plugin?
Oracle revealed that updated timelines for removal of standards-based plugin support from their browsers, eliminating the possibility to embed Java and other plugin based technologies, have been announced by the developers of Apple’s Safari and Mozilla’s Firefox and warned that the 64-bit version of Mozilla Firefox for Microsoft Windows launched without support for most NPAPI-based plugins including Java.
The good news is that the Mozilla Firefox 52 ESR 32-bit release will continue to offer support for the standards-based plugin support technology required to launch Java Applet. The bad news is that “there is no way, on the server side, to distinguish between the general version and the ESR version of Firefox,” which means that affected users may need further instructions on how to tell if they are using an ESR release (via “Help Menu -> About” and looking for the “ESR” identifier in Firefox 52) rather than developers implementing a server-side check for this. The problem is that Mozilla maintains Firefox ESR Releases for about one year, so developers will have to look for a plan B.
Java developers should begin to explore plugin-free technologies that do not rely on a browser plugin to run. One such technology is Java Web Start.
Java Web Start
Java Web Start is launched automatically when a Java application using Java Web Start technology is downloaded for the first time. The conversion of an applet to a Java Web Start application provides the ability to launch and update the resulting application without relying on a web browser. Desktop shortcuts can also launch the application, providing the user with the same experience as that of a native application.
According to the whitepaper, if an applet cannot be converted to a Java Web Start application, developers can explore alternative approaches such as:
Native Windows/OS X/Linux Installers
This option is best suited for desktop applications, where the user may not have their own JRE installed and just wants the program to run. But it may not be appropriate for server-based applications where an administrator would want full control over the environment.
Inverted Browser Control
JavaFX contains a feature called WebView, which enables applications to use an embedded version of WebKit to render HTML5 content. As a result, developers can create applications that use this browser to access remote applications.
For organizations using and deploying applications from third parties, System Administrators can use the Java Advanced Management Console to track Java usage within their organization, identifying Applet, Web Start, and other Java application types. This usage tracking lets them identify which versions of Java are used by which applications.
For more information about the deprecation step, take a look at Oracle’s JDK Enhancement Proposal (JEP 289: Deprecate the Applet API) which includes technical details about the planned deprecation step in JDK 9.