Download the rpm for JRE from Sun, at the time of writing this – https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/ViewProductDetail-Start?ProductRef=jre-6u12-oth-JPR@CDS-CDS_Developer
I use tunnelier sftp function to transfer this over to the centos machine.
Change the permissions
chmod 755 jre-6u12-linux-x64-rpm.bin
Install it
rpm -Uvh –nodeps jre-6u12-linux-amd64.rpm
I used –nodeps because I got this error and when googling found advice that suggested this was the way forward.
error: Failed dependencies:
java-gcj-compat is needed by (installed) antlr-2.7.6-4jpp.2.x86_64
java-gcj-compat >= 1.0.64 is needed by (installed) gjdoc-0.7.7-12.el5.x86_64
java-1.4.2-gcj-compat = 0:1.4.2.0-40jpp.115 is needed by (installed) java-1.4.2-gcj-compat-devel-1.4.2.0-40jpp.115.i386
java-1.4.2-gcj-compat = 0:1.4.2.0-40jpp.115 is needed by (installed) java-1.4.2-gcj-compat-devel-1.4.2.0-40jpp.115.x86_64
/usr/bin/rebuild-gcj-db is needed by (installed) eclipse-ecj-3.2.1-19.el5.centos.x86_64
Set some environment variables in /etc/profile
vi /etc/profile
The following has to be entered before the unset pathmunge statement.
JAVA=”"
export JAVA=”sun”
export JPATH=”/usr/java/jre1.6.0_12″
export JAVA_HOME=”$JPATH”
export CLASSPATH=”$JPATH/bin”
pathmunge $JPATH/bin before
Log out to refresh your environment and java -version should now reflect the new java package.
No related posts.





































