Wednesday 31 August 2011

Installing Java JDK Linux Simple Steps

There are many of ways to install the Java Development kit onto Linux operating systems. This includes installing from yum repositories. However some of these versions of java my have components missing.

The following is one of the most simplest way and ensure all of the JDK components are installed:

1. Download the compressed binary from the Java site. For example

wget http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-x64.tar.gz


2. Once downloaded run tar -xzvf on the file

3. mv the directory to /usr/local/

4. Append a reference to the directory your local profile

e.g.  vi ~/.bash_profile

add the following:

export JAVA_HOME=/usr/local/jdk1.7.0
export PATH=$PATH:/usr/local/jdk1.7.0/bin


3. Log out and back in again. Run java -version to confirm installation