JWS (Java
Web Start) is a deployment technology for Java applications through networks. This is used to
simplify installation.
With a simple click on an internet browser, JWS download, install and execute any Java application
using JNLP
Java Network Launching Protocol.
The only need for the client site is that Java is installed on his system. JWS is included in the
JRE (Java Runtime Environment) since Java 1.4.
We will see in this tutorial only what the client see.
To deployable application appears like a classic link in a web page. This
link points towards a JNLP file.
Look at this capture :
JNLP link
Now, what JWS do if you click on the link ?
If your browser associated JNLP file with JWS, you will see this download box :
Download JNLP file with Mozilla Firefox
Sorry by these French captures but I've got a
French system.
May be one day I will take English captures or your captures submites.
After downloading the JNLP file (few ko), JWS start :
JWS launching
The JNLP file contains all the informations about the application that
will be start.
It contains these informations :
- application name and description.
- author and certificate (for security purpose).
- all requiered files : classes and libraries.
- version of the JRE.
- ...
Now, JWS downloads files (jogl.jar, jogl libraries, BaseCode.jar and Tutorial26.jar) :
Downloading requiered files
After that all files are downloaded, before the application is executed,
you will be asked to accept or refuse the certificate. This is for security reason.
If you accept the certificate, the application will have all permissions (ie same permissions like when you run "classic"
applications).
Certificate
If you want to have more informations on the certificate, press "More details" button :
Certificate details
Finally, the application is launched. You can notice the JWS console :
JWS console - Application launched
You can see in all of these steps that the client don't need to know anything about Java.
He just have to know how to install Java on his computer (ie go to sun site, download jre and click
ok for installing).
Easy, no ?
We have seen that
JWS download the application and cache the application locally.
How can I find where the application is cached ?
This is very simple, go to the installation folder of your JRE. Then, launch javaws from bin
folder (ie C:\Java\jre1.5.0_05\bin\javaws.exe under Windows platform).
Javaws (JWS)
You can see the application launched previously with JWS.
The application is cache somewhere in you're hard drive (Documents and Settings/.../Sun under
Windows platform). If you want to re-execute it, just double click on it.
With this panel, you can obtain some informations like the author site, the jnlp file ...
Here is the JNLP file associated with the application (OpenGl Tutorial 26) :
JNLP file
Java application launch externally to JWS are harder to run compared with binarie (exe) application
generate by other langage like C++...
Because you need to specify where classes are stored, where to find libraries ...
I think that JWS is really cool because the user don't need to know nothing about Java to use the
application. All is done automatically !
|
Last modified on 01/07/2010 | |
Copyright © 2004-2010 Jérôme JOUVIE - All rights reserved. | http://jerome.jouvie.free.fr/ |