Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-08-2009, 03:03 PM   #1
Ross Greenwood
LQ Newbie
Registered: Jul 2009
Posts: 1

Rep: Reputation: 0
Question Installing JDK from an .rpm on RHEL5

I'm trying to upgrade my version of java from 1.4 to 1.6, and I'm trying to do so using an .rpm package and the -U option. I downloaded the .bin file from Sun's website and extracted it. But when I try to upgrade it by typing:

sudo rpm -Uvh jdk-6u14-linux-i586.rpm

I get the following message:

package jdk-1.6.0_14-fcs.i586 is already installed

However, when I try to see if it worked by typing "java -version", it still tells me I have java version 1.4.

Another strange part about this situation is that when I try to uninstall the package by typing:

sudo rpm -e jdk-6u14-linux-i586.rpm

it tells me that the package is not installed, so it seems to be contradicting itself.

Anyhow, I'm kind of a hardcore n00b and have basically no idea what I'm doing, so any help/advice would be greatly appreciated. Thanks!
Old 07-09-2009, 06:59 AM   #2
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2017 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,737

Rep: Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317
Welcome to LQ.

No, the "rpm database" will not know the package name

But probably jdk-6u14-linux-i586 , if that is correct ?
Please find the actual name with
yum list installed | grep jdk
rpm -qa | grep jdk
The reason for 'java -version' to return java version 1.4
is that the link 'java' in /usr/bin/ is pointing to " 1.4 "
This can probably be changed with the command
# /usr/sbin/alternatives --config java
( or may be : sudo /usr/sbin/alternatives --config java )
More hints here
Old 07-09-2009, 07:12 AM   #3
Senior Member
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,275

Rep: Reputation: 148Reputation: 148
check the jdk1.6.0 directory where it has located and set the environment variable as follows
export JAVA_HOME


jdk6, n00b, rpm

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
jdk 1.5 for i386 on RHEL5 ?? vikas027 Linux - Software 5 09-27-2009 05:10 PM
installing jdk tannu_ah Linux - Newbie 5 11-17-2008 04:14 PM
jdk-1_5_0_15-linux-i586-rpm shahz Linux - Enterprise 15 07-12-2008 07:35 AM
Is kdb rpm is available in RHEL5 release poornimasuresh Linux - Kernel 0 03-20-2007 08:03 AM
Installing Sun JDK naiveguy Linux - General 2 04-17-2006 03:15 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:06 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration