Custom Search
Wednesday, March 7, 2012
how to centos 6 sun java installation and firefox configuration
1) Download SUN JDK (jdk-6u25-linux-x64.bin)
==============================
http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u25-download-346242.html
2) Create directory
==============================
# mkdir /usr/java
# cp jdk-6u25-linux-x64.bin /usr/java
3) Install sun JDK
==================
# cd /usr/java
#./jdk-6u25-linux-x64.bin
4) set newly installed java as default one
==============================
# sudo rm /var/lib/alternatives/java
# sudo alternatives --config java
# sudo alternatives --install /usr/bin/java java /usr/java/jdk1.6.0_25/bin/java 1
# sudo alternatives --config java
* Enter 1
5) Check version
=============
# java -version
6)
======
# cd /usr/java
# ln -s jdk1.6.0_25 default
7)
=====
a) Create the Bourne script in /etc/profile.d/java.sh
#
# SUN Java
#
if [ -d /usr/java/default ]; then
JAVA_HOME=/usr/java/default
PATH=$JAVA_HOME/bin:$PATH
export JAVA_HOME PATH
fi
b) Create the C-shell script in /etc/profile.d/java.csh
#
## SUN Java
#
#if ( -d /usr/java/default ) then
setenv JAVA_HOME "/usr/java/default"
setenv PATH "$JAVA_HOME/bin:$PATH"
endif
c) Check
# echo $JAVA_HOME
/usr/java/default
8) Enable and Configure in Firefox
==============================
a)
#sudo rm -rf /usr/lib/mozilla/plugins/
#sudo rm -rf ~/.mozilla/plugins/
# cd ~/.mozilla/plugins/
# ls
* Create symbolic link
# ln -s /usr/java/jdk1.6.0_25/jre/lib/amd64/libnpjp2.so
# ls
libnpjp2.so
#
b) Restart firefox
* Then type "about:plugins" in address bar, there you should see plugin "Java(TM) Plug-in 1.6.0_25"
or
c) Test whether JAVA working or not
goto http://www.java.com/en/download/help/testvm.xml
###############
[saju@localhost plugins]$ java -version
java version "1.6.0_31"
Java(TM) SE Runtime Environment (build 1.6.0_31-b04)
Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01, mixed mode)
[saju@localhost plugins]$
Ref: http://www.isi.edu/~voeckler/braindump/centos-sun-java-integration.html
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment