Install JDK on RHEL5/CentOS5 Using PuTTY and XMing

java

This is yet another way that I had pieced together to install the Java Development Kit (JDK) on a Red Hat Enterprise Linux (RHEL) 5.4 and CentOS 5.4 system. This time, the process is accomplished through the use of PuTTY and XMing.

Install Java and Set Environment Variables

Download JDK6
Note: If this link doesn’t work, it may be a time limited link. You may be better off downloading the jdk-6u18-linux-i586-rpm.bin and put on another FTP account to simplify your wget statement.

wget http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jdk-6u18-linux-i586-rpm.bin?BundledLineItemUUID=N6VIBe.ldl8AAAEnS.oZJiY.&OrderID=XjdIBe.lLJIAAAEnQOoZJiY.&ProductID=6XdIBe.pudAAAAElYStRSbJV&FileName=/jdk-6u18-linux-i586-rpm.bin

Make the binary executable

chmod 755 jdk-6u18-linux-i586-rpm.bin

Install the JDK6

./jdk-6u18-linux-i586-rpm.bin

Edit the /etc/profile

gedit /etc/profile

Add variables to path

JAVA_HOME=/usr/java/default; export JAVA_HOME
PATH=$JAVA_HOME/bin:$PATH; export PATH

Log out of terminal for changes to take effect.

exit

Log into terminal to check for changes

java -version