How To Install Java 6 on Ubuntu
Misunderstandings of how to install Sun Java seem rampant on the Ubuntu forums, and trying to clear the fog is this post at the Open Source Software Geeks. As per the post, installing Java on Ubuntu is a "breeze". This is how:
Before you begin, you need to ensure that your repositories are up to date by issuing the following:
sudo apt-get updateIf you are developing Java applications, you will require Java Development Kit (JDK), on the other hand if you just require Java to run Java applications, then you need just Java Runtime Environment (JRE). For the former, the command is as follows:
sudo apt-get install sun-java6-jdk sun-java6-pluginFor JRE:
sudo apt-get install sun-java6-jre sun-java6-pluginOnce either one is done, run the sudo update-java-alternatives -s java-6-sun command and finally add the line “/usr/lib/jvm/java-6-sun” to the top of the /etc/jvm file (gksudo gedit /etc/jvm). Save and exit. To test your Java(TM) setup in the terminal type:-
java -versionIf you get an output like below, then you are done!
java version “1.6.0″ Java(TM) SE Runtime Environment (build 1.6.0-b105) Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)



Post a Comment