Friday, July 5, 2013

In this tutorial I will tell you how to install java 7 update 25 step by step

Step 1: Check Java installed or not
              $ java -version

In my system java is not installed so it is displaying these messages,If it is installed it will show the version

Step 2:Download the latest version of java from the official site or  click here to download Java

Step 3: Login as root and create a folder for Java 
            #mkdir /usr/lib/jvm

Step 4: Move the downloaded java file to the jvm folder

           #mv jdk-7u25-linux-i586.tar.gz /usr/lib/jvm/

Extract the tar file

           #tar zxvf jdk-7u25-linux-i586.tar.gz 

Remove the tar file
           #rm -r jdk-7u25-linux-i586.tar.gz 

Step 5:Update the Java location

#update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jdk1.7.0_21/bin/javac" 1
#update-alternatives --install "/usr/bin/javac" "java" "/usr/lib/jdk1.7.0_21/bin/java" 1

Step 6:Update the Default Location of Java

#update-alternatives --set "javac" "/usr/lib/jvm/jdk1.7.0_21/bin/javac" 
#update-alternatives --set "java" "/usr/lib/jvm/jdk1.7.0_21/bin/java" 

Step 7:Update system wide path

         #gedit  /etc/profile

Paste the below lines in the profile file

export JAVA_HOME
export PATH

Step 8:Reload system wide path

         #. /etc/profile

Step 9:Check JAVA Installed Properly or not

That's it JAVA Installed Properly ............That's it....BYE
Categories: ,


Post a Comment