Java WebStart is a nifty way of deploying applications. Basically, it does what applets failed rather miserably at. You can write Swing-based applications and deploy them through any web server; your clients download the application once and cache it locally, requiring reloads only if the application has been updated. Security is accounted for and consistent across platforms.

Developing WebStart applications#

Take a look at http://java.sun.com/products/javawebstart/developers.html for more information (requires registering yourself with Sun).

A WebStart application is essentially like any Swing app, with a couple of extra touches:

  • you package the app into a WAR file
  • you create a JNLP file to describe the application (this is what you link to from a web page, and what your MIME association maps to the WebStart client)
  • if you need to do something potentially dangerous (e.g. disk access, network access) in your client, you need to sign all relevant JARs in the WAR

The WebStart developer's guide and packaging guide describe the process clearly enough. Once you've written your Ant build file once, it's trivial.

Installing the WebStart client#

WebStart is bundled with Java 2 since 1.4, which pretty much takes care of standard implementation. It is also available as a separate download for Java 1.3. Many WebStart links follow Sun's example and provide a link for Windows installation; if not, or if you're working with unixy clients, this should work:

  • Download the latest JDK or WebStart
  • If you're running windowsy OS'es, you're probably done now and can check the demo's out
  • If not, unpack the downloaded zip file and run the script; it will prompt for an installation location. (As a conscientous power user you will, of course, create the installation target and run the script as a user that will not wreck your system in case of trojans, neh?)
  • Sun's installation instructions claim it will create the mime mappings for netscape, which should work after a restart. Maybe so; try it. If you're using galeon, just try one of the demos above, and when asked for a MIME association, navigate to the installed webstart binary. (Konqueror gave me a bit of a headache, but it shouldn't have; maybe it was a bug. If you try it, please enter instructions here.)

For more informations see the wiki@jnlp.net.

Testing applications#

First, have a look on the UP2GO.NET where you may found lots of goods applications. For more, the google could do the job...

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-5) was last changed on 08-Jul-2002 00:49 by 193.252.202.81