[CentOS] Installing Java 1.4.2

Fri Jan 6 15:42:38 UTC 2006
Todd Reed <treed at astate.edu>

I don't know what the specifications for scalix are, but I run OpenNMS (runs on tomcat4) and this install seems to work...at least for me.


Installing Java 1.4:
Download Sun Java J2SE 1.4 SDK and JRE from java.sun.com to the Local PC (http://java.sun.com). Use SCP to copy them to the server in the /downloads directory. The file names look like j2sdk-1_4_2_10-linux-i586.bin or j2re-1_4_2_10-linux-i586.bin.

[service at webber ~]$ 
su - 
[root at webber ~]# mkdir /usr/local/java
[root at webber ~]# cp /downloads/j2sdk* /usr/local/java
[root at webber ~]# cp /downloads/j2re* /usr/local/java
[root at webber ~]# cd /usr/local/java
[root at webber java]# chmod +x *
[root at webber java]# ./j2sdk*
[root at webber java]# ./j2re*
[root at webber java]# rm -rf *.bin
[root at webber java]# chown -R root:root j* 
[root at webber java]# ln -s j2sdk* j2sdk 
[root at webber java]# ln -s j2re* j2jre 
[root at webber java]# echo "" >> /etc/profile 
[root at webber java]# echo "if ! echo \${PATH} | grep -q /usr/local/java/j2sdk/bin ; then" >> /etc/profile 
[root at webber java]# echo "export PATH=/usr/local/java/j2sdk/bin:\${PATH}" >> /etc/profile 
[root at webber java]# echo "fi" >> /etc/profile 
[root at webber java]# echo "if ! echo \${PATH} | grep -q /usr/local/java/j2jre/bin ; then" >> /etc/profile 
[root at webber java]# echo "export PATH=/usr/java/local/j2jre/bin:\${PATH}" >> /etc/profile 
[root at webber java]# echo "fi" >> /etc/profile 
[root at webber java]# echo "export JAVA_HOME=/usr/local/java/j2sdk" >> /etc/profile 
[root at webber java]# echo "export CLASSPATH=.:/usr/local/java/j2sdk/lib/tools.jar:/usr/local/java/j2jre/lib/rt.jar" >> /etc/profile 
[root at webber java]# exit
[root at webber ~]# su - 
[root at webber ~]# java -version 
java version "1.4.2_10"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_10-b03)
Java HotSpot(TM) Client VM (build 1.4.2_10-b03, mixed mode)

From: centos-bounces at centos.org [mailto:centos-bounces at centos.org] On Behalf Of Robert Moskowitz
Sent: Friday, January 06, 2006 9:36 AM
To: CentOS mailing list
Subject: [CentOS] Installing Java 1.4.2

For scalix on Centos the Scalix forum provides instructions for convincing Scalix that Centos is Redhat:


I am up to the point of getting Java JDK1.4.2 installed.

I did a:        yum list|grep "java" and got:

gcc-java.i386                            3.4.4-2                installed       
java-1.4.2-gcj-compat.noarch             installed       
db4-java.i386                            4.2.52-7.1             base            
gcc4-java.i386                           4.0.1-4.EL4.2          base            
java-1.4.2-gcj-compat-devel.noarch          base            

Do I got what I need?

I tried:        yum install jdstk-1.4.2
and got nothing to install...

I don't see tomcat in my list of installed rpms.  Do I follow the instructions listed, or is there a yummy way to get it?  ;-)