CentOS Icon CentOS Logo
CentOS Text
   
  
www.centos.org Forum Index
   CentOS 5 - Software Support
  Help Installing JAVA 1.5 on CENTOS 5

 

 Bottom   Previous Topic   Next Topic
  •  Rate Thread
      Rate this Thread
      Excellent
      Good
      Average
      Bad
      Terrible
Poster Thread Rated:  3 Votes
  •  mojoman
      mojoman
Help Installing JAVA 1.5 on CENTOS 5
#1
Jr Board Member
Joined: 2007/11/11
From
Posts: 26
Hi,

I got these instructions from the web on how to install JAVA 1.5 from the web:

Download the file http://mirrors.dotsrc.org/jpackage/1.7/generic/non-free/SRPMS/java-1.5.0-sun-1.5.0.11-1jpp.nosrc.rpm

Download Sun JDK 1.5 update 11 from http://java.sun.com/javase/downloads/index_jdk5.jsp. Make sure you download the "self-extracting file", not the "RPM in self-extracting file", and choose the correct architecture (IA64 for Itanium processor or i586 otherwise).

Move the file into ~/rpmbuild/SOURCES

mv jdk-1_5_0_11-linux-i586.bin ~/rpmbuild/SOURCES

Build the packages:

rpmbuild --rebuild java-1.5.0-sun-1.5.0.11-1jpp.nosrc.rpm

In the end, if everything was ok, some rpms are created inside ~/rpmbuild/RPMS/i586:

java-1.5.0-sun-1.5.0.11-1jpp.i586.rpm
java-1.5.0-sun-alsa-1.5.0.11-1jpp.i586.rpm
java-1.5.0-sun-demo-1.5.0.11-1jpp.i586.rpm
java-1.5.0-sun-devel-1.5.0.11-1jpp.i586.rpm
java-1.5.0-sun-fonts-1.5.0.11-1jpp.i586.rpm
java-1.5.0-sun-jdbc-1.5.0.11-1jpp.i586.rpm
java-1.5.0-sun-plugin-1.5.0.11-1jpp.i586.rpm
java-1.5.0-sun-src-1.5.0.11-1jpp.i586.rpm

You may remove the file java-1.5.0-sun-src-1.5.0.11-1jpp.i586.rpm

Install the RPMs as user root:

su -
cd /home/<username>/rpmbuild/RPMS/i586
rpm -Uvh java-1.5.0-sun-1.5.0.11-1jpp.i586.rpm
rpm -Uvh java-1.5.0-sun-alsa-1.5.0.11-1jpp.i586.rpm
rpm -Uvh java-1.5.0-sun-plugin-1.5.0.11-1jpp.i586.rpm

Configure the Alternatives system and choose the JDK you want (run as root):

alternatives --config java

Then try to execute java:

java -version

You should get:

java version "1.5.0_11"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode, sharing)

-----------

The problem is when I try and use the rpmbuild command as per the second instructions my shell says says it does not recognize the command. I am using the default shelll that CENTOS uses. Any help would be appreciated...
Posted on: 2008/1/23 20:17
Create PDF from Post Print
Top
  •  michaelnel
      michaelnel
Re: Help Installing JAVA 1.5 on CENTOS 5
#2
Professional Board Member
Joined: 2006/5/29
From San Francisco, CA
Posts: 1483
If /usr/bin/rpmbuild doesn't exist on your machine then "yum install rpm-build".
Posted on: 2008/1/23 20:27
Create PDF from Post Print
Top
  •  anselm
      anselm
Re: Help Installing JAVA 1.5 on CENTOS 5
#3
Newbie
Joined: 2006/9/28
From
Posts: 4
This link explains how to install java:

http://howtoforge.com/

Look for how to set up the perfect CentOS5 desktop.
Posted on: 2008/2/1 8:47
Create PDF from Post Print
Top
  •  yyagol
      yyagol
Re: Help Installing JAVA 1.5 on CENTOS 5
#4
Professional Board Member
Joined: 2006/6/10
From 32°4′N 34°47′E
Posts: 1015
Why do you go though all this trouble , take a look at this
wiki http://wiki.centos.org/HowTos/JavaOnCentOS
or the other method is to download the rpm from http://www.java.com
and install via RPM command , then just link the java command to /usr/bin/java
and run the alternative command to finish the business .
_________________
We all know Linux is great... it does infinite loops in 5 seconds.
Linus Torvalds
Posted on: 2008/2/1 12:08
Create PDF from Post Print
Top
 Top   Previous Topic   Next Topic

 


 You cannot start a new topic.
 You can view topic.
 You cannot reply to posts.
 You cannot edit your posts.
 You cannot delete your posts.
 You cannot add new polls.
 You cannot vote in polls.
 You cannot attach files to posts.
 You cannot post without approval.




"Linux" is a registered trademark of Linus Torvalds. | All other trademarks are property of their respective owners. | All other content is Copyright @ 2004-2009 by the CentOS Project or "each individual contributor (forums, comments, etc.) unless otherwise assigned".| Theme based on a theme by 7dana.com