This page provides a collection of tips for getting java applications and applets to work in your browser.
If you do not have Java installed, download and install it first. 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).
Note where you install it; some instructions below refer to this location as $JAVA_HOME. On Linux, this is probably something like /opt/j2sdk1.4.2 (e.g.); on Windows, it is probably C:\Program Files\Java....
If you have an up-to-date OS X system, you already have Java 1.4 installed.
When launched via Java Webstart, 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. This generally work by default on Windows (assuming you have Java 1.4.2 or later, see below) and Mac OS X. You will be prompted to accept a certificate from CADC and from CDS (for Aladin code).
Windows: install Java 1.4.2 or later
Mac OS X: keep OS X up to date, works well with the newer (optional) Java 1.5
Linux: install Java 1.4.2 or later AND configure file handling (mimetype application/x-java-jnlp-file and file extension *.jnlp to be opened by the javaws program: $JAVA_HOME/jre/javaws/javaws). There is a known bug in javaws when running on kernel 2.6 where the javaws process locks on startup; see our FAQ for more details.
Firefox uses a plugin to run Java applets in web pages.
You need a symlink to the Java plugin in the mozilla/firefox plugins directory. This plugins directory is called plugins and is located wherever mozilla or firefox is installed. It sshould already contain a file called libnullplugin.so, so you can find the plugins directory (or directories if you have multiple browsers/versions) using the following command(s):
locate libnullplugin.so
If your system doesn't have the locate command, then use find instead. For each plugin directory you find:
cd /path/to/plugins ln -s $JAVA_HOME/jre/plugin/i386/ns610-gcc32/libjavaplugin_oji.so .
On Windows, the plugin will be visible to these browsers and to Internet Explorer once you install Java. For internet explorer, you may have to configure it to use Java 1.4 rather than the included Microsoft JVM for applets.
Mozilla and Firefox on OS X cannot use Java 1.4 at this time, despite it being installed. See bug 197813 for more details than you probably need.
Safari uses Java 1.4 already.
Configure Konqueror to use the right Java from the Setting->Configure Konqueror menu, then chose Java + JavaScript from the list on the left. Enter the Path to Java executable: $JAVA_HOME/bin/java. This window is also used below to configure how Konqueror and Java interact.
Some settings for the Java runtime need to be configured so that anythign beyond a trivial applet will run well. The most important are to show the java console so you get some idea when something goes wrong (at least you can submit a good good bug report) and increase the Java heap size for applets that require more memory (256MB in the examples below).
This should apply to all platforms that use the plugin (Unix or Windows with Firefox or Mozilla).
Use the File->Open File menu item and then browse to the Java installatino directory and load
$JAVA_HOME/jre/ControlPanel.html (an applet that configures the plugin). If this applet does not load,
you should go back to installing and configuring Java (especially the symlink on Unix systems) and check
that everything is correct. If the applet loads, use the Basic tab to enable Show console, then
click Apply. Switch to the Advanced tab and add to or change Java Runtime Parameters
to include -Xmx256m
and click Apply again.
TODO...
Open the Java + Javascript configuration window using Settings->Konqueror as above.
Check the boxes for Show Java console and Use security manager (highly recommended).
Add to or change Additional Java Arguments to include -Xmx256m
and click OK.
The main applet jars are signed, konqueror prompts for permissions, but it doesn't actually grant sufficient permissions and you eventually get a bunch of AccessControlException(s) when code tries to check various system properties. Work-around #1 (NOT RECOMMENDED): disable the security manager. Work-around #2 (extreme hassle): find kjava.policy and edit to grant more permissions.
Nodes don't expand/collapse when you click on the triangle. Work-around: double-click the text beside the triangle.
OK, I did that, but when I double click, sometimes (usually?) the wrong node expands or collapses; this thing is useless. Work-around: no known workaround; this only happens in Safari so it appears to be a platform issue.
Yes. Work-around: none.