Installing Java 6 in Ubuntu Intrepid

By tutysara

I installed java6 in intrepid using the command

sudo apt-get install sun-java6-jdk

and the installation went fine without any errors. I opened a terminal to check the installation and typed the command.
java -version
It displayed
java version “1.6.0_10″
Java(TM) SE Runtime Environment (build 1.6.0_10-b33)
Java HotSpot(TM) Client VM (build 11.0-b15, mixed mode, sharing)


Now we have sun java installed as the defaulf JVM.
If we install any other package like eclipse that uses OpenJdk by default it changes the default JVM. To change the default JVM back to sun open a terminal and type in the command

sudo update-java-alternatives -s java-6-sun


In the command you can replace java-6-sun with the version of java you have.

Tags: , , , ,

Leave a Reply