My blog has moved! Redirecting...

You should be automatically redirected. If not, visit http://techienote.com and update your bookmarks.

Tech Resources

Tuesday, July 6, 2010

Installing java on linux


Download java binary installation file for linux from java website http://www.java.com

Copy the binary file to /usr/local
#cp jre-6u20-linux-i586.bin /usr/local/

Extract the binary file
#cd /usr/local
#chmod +x jre-6u20-linux-i586.bin
#./jre-6u20-linux-i586.bin

Now you will see jre1.6.0_20 folder in /usr/local/ dir, We need to set system variable, to run the java properly
Setting the system variable for java
#vi /etc/profile.d/java.sh

export J2RE_HOME=/usr/local/jre1.6.0_20
export PATH=$J2RE_HOME/bin:$PATH

#source /etc/profile.d/java.sh

For finding your java version just do;
#java -version
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode, sharing)


Labels: , , , , ,

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home