Skip to content

How to install Sun’s Java Development Kit (JDK) v5.0 : Ubuntu (6.06.1 / 6.10)

I recently started learning Java and found that I needed the Java Development Kit to be able to develop or compile any Java programs. Below is a quick outline on how to install Sun’s Java Development Kit v5.0 for java development on Ubuntu 6.06.1 or 6.10 machines.

sudo aptitude install sun-java5-jdk

You will have to accept the license agreement to install the JDK. For more on this please see my previous post entitled: How to install Java Runtime Environment (JRE) which includes a link to the DLJ license terms.

You may also want to set Sun’s JDK as the default Java version on your machine. You can do so using the following command.

sudo update-java-alternatives -s java-1.5.0-sun

..and lastly you’ll need to move java-1.5.0-sun to the top of the JVMs offered within the file /etc/jvm. This needs to be done manually using:

sudo gedit /etc/jvm

Below is an example of my completed /etc/jvm file after following this tutorial. Yours should look similar:

# This file defines the default system JVM search order. Each
# JVM should list their JAVA_HOME compatible directory in this file.
# The default system JVM is the first one available from top to
# bottom.

/usr/lib/jvm/java-1.5.0-sun
/usr/lib/jvm/java-gcj
/usr/lib/jvm/ia32-java-1.5.0-sun
/usr

At this point, enjoy your new JDK powered machine and start developing!

technorati tags:, , , ,

If this site has been useful, please consider participating in the Fundraiser.

Other Points of Interest

  • No Related Post