LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 07-08-2009, 02: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, 05:59 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,635

Rep: Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268
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
.....
 
Old 07-09-2009, 06:12 AM   #3
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,274

Rep: Reputation: 148Reputation: 148
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
 
  


Reply

Tags
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 04:10 PM
installing jdk tannu_ah Linux - Newbie 5 11-17-2008 03:14 PM
jdk-1_5_0_15-linux-i586-rpm shahz Linux - Enterprise 15 07-12-2008 06:35 AM
Is kdb rpm is available in RHEL5 release poornimasuresh Linux - Kernel 0 03-20-2007 07:03 AM
Installing Sun JDK naiveguy Linux - General 2 04-17-2006 02:15 PM


All times are GMT -5. The time now is 09:32 AM.

Main Menu
Advertisement
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
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration