Penguin
Note: You are viewing an old revision of this page. View the current version.

JDK is the Java Development Kit, A software development package from Sun Microsystems that implements the basic set of tools needed to write, test and debug Java applications and applets.

Ubuntu Edgy 6.10

First we make sure that the backport repository is available in our sources.list

Use your favourite text editor to open up the sources.list.

  • sudo vim /etc/apt/sources.list

Make sure the following two lines are not commented out (Commented out means that the line begins with a '#' character):

deb http://nz.archive.ubuntu.com/ubuntu/ edgy-backports main restricted universe multiverse
deb-src http://nz.archive.ubuntu.com/ubuntu/ edgy-backports main restricted universe multiverse

If you also would like to install the Eclipse IDE, then make sure the universe repository is available on the sources.list file.

deb http://nz.archive.ubuntu.com/ubuntu/ edgy universe
deb-src http://nz.archive.ubuntu.com/ubuntu/ edgy universe

Save the sources.list.

Now we need to update our list of available packages from the apt sources.

  • sudo aptitude update

Now we download and install Java 1.6.

  • sudo aptitude install sun-java6-jdk

There is a fair bit to download so hopefully you are no longer using dial-up :) A few license agreements will pop-up, just choose OK.

Now that is done we need to make sure that we are using the correct version of java.

  • sudo update-alternatives --config java

You will see a few alternatives. Select the option that has java-6-sun in the java path.

Now we will do the same thing for the compiler:

  • sudo update-alternatives --config javac

Once again select the alternative with java-6-sun in the path.

For those who wish to use the Eclipse IDE.

  • sudo aptitude install eclipse

You should be all ready to start coding in java!