Installing Java on Ubuntu

If your operating system is Ubuntu ( any version), you need to install java in order to run java based application and applets. There are a few way to do it. First of all, you sure if these repo was added in yoru /etc/apt/source.list

Open it via your editor ( like gedit, nano, emcas)


rayyildiz@iceface:~$ sudo gedit /etc/apt/sources.list

Be sure these repo was added


deb http://us.archive.ubuntu.com/ubuntu feisty main restricted
deb http://us.archive.ubuntu.com/ubuntu feisty universe multiverse

After that, you must refresh app cache and install with this command.


rayyildiz@iceface:~$ sudo aptitude update
rayyildiz@iceface:~$ sudo aptitude install sun-java6-jdk

You can ensure this command which version java you are using.


java -version

If you have a few JVM environment, you have to set JVM what you want to use.

update-java-alternatives -l
sudo update-java-alternatives -s java-1.6.0-sun

Again be sure which JVM version you are using by “java -version”

Leave a comment

Your comment