Java Web Start FAQ
What will happen if I press the button?
In short it will download/update a java program and execute it.
The button is linked to a "jnlp" file so this what is sent to your browser. The jnlp file is an xml document detailing what Java Web Start needs to do. If you already have a modern version of Java installed on your machine the "*.jnlp" file association will have already been set to run the WebStart. This is no different from the case where a link to a word document starts the MSWord program to read the file.
The jnlp contains instructions for the WebStart program on where to find the program jar files/icons etc. Here is an example of such a file.
Do I need to have a web browser running to run this program?
No you don't. Of course to install it you need to use your browser but afterward Java Web Start ensures that the code acts exactly like a "normal" program. You don't even need to be connected to the internet... all the necessary files are store locally. You can find out where the files are cached using the Java Control Panel
How do I get Java for my computer?
First - are you sure you don't have Java already? See if you can't navigate to the Java Applications Viewer -- How do I find the Java Web Start "Applications Viewer"?. If you have found it then look for an "About..." button and check the version is at least 1.5 click->.
If you find nothing then go to http://java.sun.com/javase/downloads/ and look for Java Runtime Environment (JRE) - the higher number the better - and select the button. There are instructions to follow on this webpage.
Do I need to be "online" to run the application?
No. Your computer has a cache directory with all that is required (jars files mainly) for the application to run. In fact, with the current configuration of the jnlp files used at ce4csb you have to manually upgrade your application (see below).
How do I upgrade my Application?
You use the Java Web Start "Application Viewer" (see - here - on how to find this on your computer). Find your application in the list and right click on the row. You should see "Run Online" in the context menu popup. Selecting this will update - if there are any updates - the application. You need to be online - of course - for this operation to succeed :-).
How do I find the Java Web Start "Applications Viewer"?There are certain differences between Java 1.5 (aka Java 5) and Java 1.6 (aka Java 6). The images show below refer to version 1.6 in the case of Windows and 1.5 for Linux and the Mac.
If you use Windows, go to the Control Panel (Start > Control Panel) and double-click on the Java icon (If you don't have a Java icon you don't have Java - see How do I get Java on my computer?). Under the "General" tab and in the "Temporary Internet Files" [sic!] rubric you will find a "View..." button. Click this button to active the Application Viewer. (click on the image at right to see a larger representation)
If you use Linux - at least the KDE Kdesktop - go to the Preferences Menu (Preferences > Java) Under the "General" tab and in the "Temporary Internet files" you will find a "Settings..." button. Click the button to active the Temporary File Settings dialog. On this dialog should be a "View Applications..." button. This button will active the Application Viewer.
On the Mac use the filebrowser and navigate Filebrowser > Application > Utitities > Java > Java Web Start.
Example of a JNLP file
This is an example of a JNLP file... it is very simple. Some of the coloured highlights show which website to get the program from, whether it can run "off-line", which jar file to use and where to put it in the Windows start menu.
<?xml version="1.0" encoding="utf-8"?> <jnlp spec="1.5+" codebase="http://www.ce4csb.org/applications/atmatch/" href="atmatch-all.jnlp"> <information> <title>AtMatch</title> <vendor>Computational Systems Biology</vendor> <homepage href="http://www.ce4csb.org/software.shtml#atmatch"/> <description>AtMatch Application</description> <description kind="short">Match At numbers from Mascot to GeneSpring output.</description> <description kind="tooltip">Match At numbers to masses</description> <icon href="media/aticon.gif"/> <icon kind="splash" href="media/atmatch.jpeg"/> <offline-allowed/> <shortcut online="false"> <desktop/> <menu submenu="Computational Systems Biology"/> </shortcut> <related-content href="http://www.ce4csb.org/applications/gpl-3.0.txt" > <title>License</title> <description>This product is Licensed under a creative commons license</description> <icon href="http://www.ce4csb.org/images/icons/readme.gif" /> </related-content> </information> <security> <all-permissions/> </security> <resources> <j2se version="1.5+"/> <jar href="http://www.ce4csb.org/jnlp/atmatch/atmatch-all.jar" part="atmatch" /> <package name="org.csb.mzinvert.*" part="atmatch" recursive="true" /> </resources> <application-desc main-class="org.csb.mzinvert.ui.Main"/> </jnlp>
How do I create a desktop Icon for Java Web Start on Linux (KDE)
Remember to name the
.desktop file as (say)
vendor-expa.desktop. To add to global menu list copy the file to
directory. To locally add it to the menu copy it to
~/.kde/share/applnk/ directory. To put in on the desktop just copy it to the
~/Desktop directory. On the other hand it is not enough to copy
~/.kde/share/apps/kicker for it to be shown in the kicker (the band at bottom of screen). You need to edit
~/.kde/share/config/kickerrc; best really to copy file to desktop and then drag it onto the kicker.
The icons are in the
/usr/share/icons subdirectories and you can specify them ignoring the extention.
You might need the javaws applicaiton in your path use (e.g.):
/usr/sbin/alternatives --install /usr/local/bin/javaws javaws \ /usr/lib/jvm/java-1.5.0-sun-220.127.116.11/jre/bin/javaws 1(You'll need to be superuser). Here is an example desktop file
[Desktop Entry] Categories=Application;Utility Comment=Errrr Exec=javaws http://www.ce4csb.org/applications/mz2mgf/mz2mgf-all.jnlp GenericName=Expa Icon=tv MimeType= Name=Expa2 Path= #StartupNotify=true Terminal=false Type=ApplicationNotes: Don't set
StartNotify=trueor the system will bounce a ball waiting for the application (javaws) to give it notification that the program has started (which will never come).