LinuxQuestions.org
Have you heard the LinuxQuestions.org Podcast?
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Newbie
User Name
Password
Linux - Newbie This 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!

Notices

Tags used in this thread
Popular LQ Tags , ,

Reply
 
Thread Tools
Old 07-08-2009, 03:03 PM   #1
Ross Greenwood
LQ Newbie
 
Registered: Jul 2009
Posts: 1
Thanked: 0
Question Installing JDK from an .rpm on RHEL5


[Log in to get rid of this advertisement]
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!
Ross Greenwood is offline  
Tag This Post , ,
Reply With Quote
Old 07-09-2009, 06:59 AM   #2
knudfl
Senior Member
 
Registered: Jan 2008
Location: Copenhagen, Denmark
Distribution: pclos2009.2, slack13, Debian Lenny (+30 others, for test only)
Posts: 2,907
Thanked: 267
Welcome to LQ.

No, the "rpm database" will not know the package name
jdk-6u14-linux-i586.rpm

But probably jdk-6u14-linux-i586 , if that is correct ?
Please find the actual name with
yum list installed | grep jdk
or
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
http://fedorasolved.org/browser-solutions/java-i386
.....
knudfl is offline     Reply With Quote
Old 07-09-2009, 07:12 AM   #3
kirukan
Member
 
Registered: Jun 2008
Location: Srilanka
Distribution: Redhat, Solaris, Suse
Posts: 505
Thanked: 44
check the jdk1.6.0 directory where it has located and set the environment variable as follows
Ex-
JAVA_HOME=/usr/java/jdk1.6.0
export JAVA_HOME
kirukan is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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


All times are GMT -5. The time now is 12:43 PM.

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