Hi
I have Ubuntu installed on my PC. I am trying to install java on ubuntu but I can't get it right. So, how to install java on ubuntu. Please explain in details as I an new to Ubuntu.
Hi
I have Ubuntu installed on my PC. I am trying to install java on ubuntu but I can't get it right. So, how to install java on ubuntu. Please explain in details as I an new to Ubuntu.
Below described is one of the way to install java in ubuntu.
Follow these steps
1) Type the command to get the latest version of java
2) Install Java jdk and jre with apt-get install commandCode:apt-cache search jdk
3) Ubuntu will auto detect the necessary files and you will see the following on your monitor screen:Code:apt-get install sun-java6-jdk sun-java6-jre
4) After installation is completed jdk and jre will be located at /usr/lib/jvm/java-6-sun-1.6.0.06Do you want to continue [Y/n]? y
Get:1 http://my.archive.ubuntu.com hardy/main java-common 0.28ubuntu3 [78.2kB]
Get:2 http://my.archive.ubuntu.com hardy/multiverse sun-java6-jre 6-06-0ubuntu1 [6334kB]
Get:3 http://my.archive.ubuntu.com hardy/main odbcinst1debian1 2.2.11-16build1 [66.2kB]
Get:4 http://my.archive.ubuntu.com hardy/main unixodbc 2.2.11-16build1 [289kB]
Get:5 http://my.archive.ubuntu.com hardy/multiverse sun-java6-bin 6-06-0ubuntu1 [27.3MB]
Get:6 http://my.archive.ubuntu.com hardy/multiverse sun-java6-jdk 6-06-0ubuntu1 [9625kB]
85% [6 sun-java6-jdk 3208002/9625kB 33%]
5) For a shortcut access ubuntu creates a symbolic link to /usr/bin
You can also download Java Binary Package and install it. First download the java .bin file for internet, it is easily available. After downloading is completed copy the file to /opt and issue the following command
If any problem feel free to post again.sudo sh ./jre-6u1-linux-i586-rpm.bin
sudo update-alternatives --config java
(And pick the one you just installed as your default version.)
java -version
Bookmarks