Ubuntu 8.04

A) Installing various Java engines

Install Sun's closed-source Java VM and browser plugin. Type these commands in a terminal window. Applicable on 32 bits (i386) Ubuntu only !
sudo apt-get install --reinstall -y sun-java6-jre sun-java6-plugin

OR

Recommended
Install the free OpenJDK Java VM and Icedtead java-plugin for Firefox/Opera/Mozilla browsers. Note that these packages are part of the "ubuntu-restricted-extras" meta package. Applicable on both 32 and 64 bits Ubuntu.
sudo apt-get install --reinstall -y icedtea-gcjwebplugin openjdk-6-jre  openjdk-6-jre-lib
You can achieve same result by installing the ubuntu-restricted-extras meta package.

B) Setting the default Java VM

First, list all installed Java VMs (virtual machines)
sudo update-alternatives --list java
/usr/lib/jvm/java-6-openjdk/jre/bin/java
/usr/lib/jvm/java-6-sun/jre/bin/java

And list all available browser plugins for Java
sudo update-alternatives --list xulrunner-1.9-javaplugin.so
/usr/lib/jvm/java-6-openjdk/jre/lib/i386/gcjwebplugin.so
/usr/lib/jvm/java-6-sun/jre/plugin/i386/ns7/libjavaplugin_oji.so

Now set the default (active) Java VM if you have several choices.
sudo update-alternatives --config java
Here I want to activate the Sun's Java VM (java-6-sun).

Selection Alternative
* 1
/usr/lib/jvm/java-6-openjdk/jre/bin/java
   2
/usr/lib/jvm/java-6-sun/jre/bin/java
Press enter to keep the default[*], or type selection number: 2 <--- in my case the "/java-6-sun/jre/bin/java" is number 2.
Using now '
/usr/lib/jvm/java-6-sun/jre/bin/java' to provide java.


And set the default (active) browser java-plugin.
sudo update-alternatives --config xulrunner-1.9-javaplugin.so
Here I want to activate the Sun's browser plugin for Firefox (libjavaplugin_oji.so).

Selection Alternative
* 1
/usr/lib/jvm/java-6-openjdk/jre/lib/i386/gcjwebplugin.so
   2
/usr/lib/jvm/java-6-sun/jre/plugin/i386/ns7/libjavaplugin_oji.so
Press enter to keep the default[*], or type selection number: <--- in my case the "libjavaplugin_oji.so" is number 2.
Using now '/usr/lib/jvm/java-6-sun/jre/plugin/i386/ns7/libjavaplugin_oji.so' to provide 'xulrunner-1.9-javaplugin.so'.

You must restart your Firefox/Opera/Mozilla after these changes.
pkill firefox


Developing Java applications:
To set the Java compiler (javac), run these commands.
sudo update-alternatives --list javac
sudo update-alternatives --config javac
You must also install the java development kit (*-jdk) package.
$ apt-cache search '\-jdk'
-----

Go back to http://www.futuredesktop.org