Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

A Better Java Webstart for Standalone Apps

DZone's Guide to

A Better Java Webstart for Standalone Apps

· Java Zone ·
Free Resource

Verify, standardize, and correct the Big 4 + more– name, email, phone and global addresses – try our Data Quality APIs now at Melissa Developer Portal!

Webstart is a nice solution for deploying Java applications. But when it comes to a corporate environment, it has a not-so-small problem: The Java Runtime System itself.

If several applications share the same Runtime, you may get into version trouble—Some applications want to have the latest Java version to fix some bugs. Other applications don’t want to update because they fear incompatibilities. Or there is simply no budget for regression testing all applications with a new Java version.

Some of you may argue against it because Java has claimed to be always backward compatible—But believe me, that’s not true. I took part in three version updates 1.3=>1.4=>1.6 and there were always changes in the behavior of the UI that need to be addressed!

In my opinion, an optimal Java (standalone) application is simply copied into a local directory and has its own Java Runtime inside this directory. That way, it can be easily removed by simply deleting the directory, and it no side effects occur with different JRE versions or with the OS environment in which it’s running.

But how do we update such an installation? We simply use Webstart as a kind of Bootstrap Loader!

The process should be as follows:

  1. Start a generic updater with Webstart.
  2. The updater refreshes all changed JAR files of your application. This includes the JRE itself that lives inside the application directory.
  3. Finally, the updater starts your application using the local Java Runtime.

 

That way you have best of both worlds: The updater itself is updated with the standard Webstart mechanism, and your application runs completely independent from the environment. A nice surplus is that you no longer need to sign your JAR files because the main program is no longer a Webstart application (only the Generic Updater needs to be signed).

Developers! Quickly and easily gain access to the tools and information you need! Explore, test and combine our data quality APIs at Melissa Developer Portal – home to tools that save time and boost revenue. Our APIs verify, standardize, and correct the Big 4 + more – name, email, phone and global addresses – to ensure accurate delivery, prevent blacklisting and identify risks in real-time.

Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}