Install Sun JDK & JVM on RHEL

In: Ubuntu or Linux

9 Dec 2008
  1. Goto download the latest jdk from sun’s website
    http://java.sun.com/javase/downloads/index.jsp
  2. Accept the agreement and download the JDK RPM-in-bin for linux and make the downloaded binary executable and run it:
    $ chmod u+x jdk–linux-i586-rpm.bin
    $ ./jdk–linux-i586-rpm.bin
  3. The rpm is extracted from the bin and installed. The java version is now installed in /usr/java/.
  4. Get the matching JPackage compatibility package for this Sun JDK:
    $ links ftp://jpackage.hmdc.harvard.edu/JPackage/1.7/generic/RPMS.non-free/
    $ rpm -ivh java-x.x.x-sun-compat-x.x.x.xx-1jpp.i586.rpm

For RHEL 5.2 or higher you can just install the latest packages from the repository:

$ yum install java-1.6.0-sun-devel

Make the Sun VM default for the system

To make the Sun JDK the default for the entire system, use the ‘alternatives’ method. This will create symlinks in /etc/alternatives/ that are used throughout the entire system (eg see “$ ll /usr/bin/java”).
[select the Sun version instead of the GNU version for each of these commands]

$ /usr/sbin/alternatives --config java
$ /usr/sbin/alternatives --config javac




Comment Form

About this blog

This is a place I create just for fun and to write down some experience and notes for myself. So feel free to enjoy and drop any comments you have. I had been employed as Programmer, System Analysts, System Administrator, DBA and Project Manager. I will share some of my case study here as well. Enjoy!

 

Calendar

September 2010
M T W T F S S
« Jul    
 12345
6789101112
13141516171819
20212223242526
27282930