Using Sun's Java Runtime Environment with Ubuntu Linux

From Julian Yap

On 17 May 2006, Sun announced that distributors of the open source GNU/Linux and OpenSolaris operating systems will now be able to redistribute Java Platform, Standard Edition 5 under new licensing arrangements.

Steps

Install the Java run time environment and Plug ins:

$ apt-get install sun-java5-jre sun-java5-plugin

Set the correct java version by:

$ update-alternatives --set java /usr/lib/jvm/java-1.5.0-sun/jre/bin/java
Using `/usr/lib/jvm/java-1.5.0-sun/jre/bin/java' to provide `java'.
$ java -version
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)