Sunday, September 24, 2006

Java runtime on Ubuntu

Getting the Java Runtime Environment (or JDK) installed on Ubuntu is a simple apt-get away. You'll need to ensure the multiverse repository is enabled, then just do the following:

$ sudo apt-get install sun-java5-jre

or the following, for the JDK:

$ sudo apt-get install sun-java5-jdk

Then, install the FireFox plugin with:

$ sudo apt-get install sun-java5-plugin

Once done, make the newly installed Java runtime the system default by doing the following:

$ sudo update-alternatives --config java

and select Sun's Java runtime as the default runtime to use.


Newer versions of Ubuntu have Java 6 available so just replace 5 with 6 (or the appropriate version number you wish to install). Thanks go to Josiah for pointing this out :-D