How to install the JDK on Ubuntu Linux
Hello everyone! I recently made the change from Windows to Linux. I've really enjoyed it so far, and everything worked out of the box except getting the JDK. I had a bit of trouble getting it to work, so I'll post what I did for everyone else.
Step one: Open the Terminal
Go to Applications>Accessories>Terminal
Step two: Find out the current version of the JDK
Code :
sudo apt-cache search jdk
Step three: Install the JRE and JDK using apt-get
Code :
sudo apt-get install sun-java6-jdk sun-java6-jre
Step four: Confirmation
Ubuntu is going to start the download and ask you if you want to continue. Press "y" and hit enter.
Post installation: Append files
Set JAVA_HOME into environment variable
Copy following statement and append to /etc/profile or .bashrc file, make system set JAVA_HOME into system environment variable.
Code :
export JAVA_HOME="/usr/lib/jvm/java-6-sun-1.6.0.06;"
Ported from: How to install java jdk on ubuntu (linux)
Re: How to install the JDK on Ubuntu Linux
Re: How to install the JDK on Ubuntu Linux