CADC Canadian Astronomy Data Centre

Overview

This page is here to help you get Java Webstart applications to work from your browser. Use the tests below to verify your Java installation and configuration.

Try the Java Web Start Test Application

The application checks some system properties (like which version of Java is being used), some filesystem-related permissions, and the amount of memory Java is allowed to use. The code is signed by the Canadian Astronomy Data Centre using a self-generated developer certificate (not created by a Certificate Authority); you need to accept the certificate in order to run the software.

We are currently recommending Java 7 (also referred to as Java 1.7) or later. When choosing which Java to install, if you only want to run Java programs and applets, get the JRE (Java Runtime Environment); if you want to develop Java software, get the JDK (Java Development Kit).

Terminology

         Linux       Windows       Mac OS X   

Linux Installation

1. Get the latest Java (1.7 or higher)

To check if Java is installed run the command java -version. The build number for Java should be 1.7.x.

If the latest Java is not installed, Download and install it first.

Some instructions below refer to this location as $JAVA_HOME. This is probably something like /usr/lib/jvm/java (depending on which Linux distribution you have).

2. Configure Java Web Start

When launched via Java Web Start, the jar files for the application are only downloaded once (or when they are updated on the server) and the program runs as a normal application on your computer.

Firefox, Mozilla

The first time you try to open a JNLP file, you will be prompted to either open it with an application or save it to disk. You should chose to open it and then browse to (or enter) the full path to the javaws program ($JAVA_HOME/bin/javaws). The browser will remember your decision; there is also a check box to get the browser to not prompt you in future, but it is safer to not check it until you are sure Java Web Start is working properly.

Konqueror

You may have to configure Konqueror so it knows to use the Java Web Start application when you open a JNLP file. Choose Settings->Configure Konqueror, select File Associations in the left panel, expand the application item in the tree in the right, and look for x-java-jnlp-file (or search for the pattern jnlp). If it is there, select it and make sure javaws is listed as the application (select it and click Edit to check the path, or click Add to add it). If it is not there, you can add a new mime type with the Add button below the list of known types.

3. Configure Java Runtime Settings

The Java Control Panel allows you to configure runtime settings for Java Web Start applications and Java applets. Some settings for the Java runtime need to be configured so that anything beyond a trivial applet will run well. The most important is to increase the Java heap size for applets that require more memory (256MB in the examples below).

In Java 5, runtime settings for Java Web Start applications and Java applets are both configured using the Java Control Panel application. To open the Java Control Panel run the command $JAVA_HOME/bin/ControlPanel (with no arguments).

To increase the heap size for Java applets, open the Java Control Panel, and select the Java tab. You will see View... buttons for applet settings (top) and application settings (bottom). Click the button for applet settings to open another dialog which lists one or more versions of Java installed. In the last column of the table you can put JVM options (double-click the cell). To set the maximum memory size to 256MB, enter -Xmx256m, then click OK to save the settings.

Linux

Troubleshooting Tips

To aid in resolving configuration and start-up issues, it is a good idea to enable the Java Console so you can see any error messages. To enable the Java Console, open the Java Control Panel, select the Advanced tab, expand the items under the Java console, and select the Show console option.

Linux Java Console

The Java Web Start application allows you to view installed Web Start applications. To open Java Web Start run the command $JAVA_HOME/bin/javaws (with no arguments). The Java Application Cache Viewer window shows Java Web Start applications and libraries you have used in the User tab (the System tab is likely empty).

The correct mime type for JNLP files is application/x-java-jnlp-file and file name patterns should include at least *.jnlp (although other file names, including dynamically generated jnlp files, are sometimes used). The Java 5 installation should configure the mime type for you.

cadc-www-02.cadc.dao.nrc.ca Thursday, 28-Mar-2024 15:25:44 PDT