Saturday, August 29, 2009

Installing and Using Java on Ubuntu....

Java

Installing and switching between versions of Java on Ubuntu is a relatively simple process (with a couple of caveats), you just need to know the right commands. Considering that there was a time when I didn’t know this either I thought I’d share what I know (shouldn’t take long :)).

Anyways, first thing first. When we talk about installing Java on Ubuntu we are of course talking about Sun Java. You can also install Open JDK if you want, but most people will use the Sun version for their Java development. Of course these days there are several versions of Sun Java that are in mainstream use; well basically 2, Java1.5 and Java6 (I am sure things will be even more interesting when Java 7 comes out). Regardless of which version of the JDK you want to install the process to do this on Ubuntu is the same. You need to know what package you want to install and then you need to use our old friend apt-get.

Installing Java

In the case of the Sun JDK you will want to install either (or both) of:

sun-java5-jdk
sun-java6-jdk

1 comment:

  1. You are providing incomplite instruction. Aren't you supposed to use "sudo" command? What about PATH declaration? You better to check out more documentation dude, example https://help.ubuntu.com/community/JavaInstallation?highlight=%28%28Java%29%29

    ReplyDelete