LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 01-05-2012, 11:07 AM   #1
akashj87
LQ Newbie
 
Registered: Nov 2008
Posts: 7

Rep: Reputation: 0
RHEL5 JDK 6 Installation


I downloaded jdk 6 and installed it , the files are in
/opt/ab/java/jdk1.6 ...


But when I am running java - version in terminal, its showing for 1.4 (the default that comes)

How do i point to the 1.6 installation ?
 
Old 01-05-2012, 11:10 AM   #2
kbscores
Member
 
Registered: Oct 2011
Location: USA
Distribution: Red Hat
Posts: 259
Blog Entries: 9

Rep: Reputation: 32
most likely within .bashrc file there is a parameter that needs to be set. Then source .bashrc file by doing:

Code:
. ./.bashrc
 
Old 01-07-2012, 04:26 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Using the "Easy selector for java versions" : /etc/alternatives/

1) su
2) Like ....
/usr/sbin/alternatives --install /usr/bin/java java /opt/ab/java/jdk1.6.0_26/bin/java 2

3) /usr/sbin/alternatives --config java
.. And then select the "sun jdk6".

..
 
  


Reply



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
[SOLVED] JDK 6 Installation problem- hussainv1 Linux - Desktop 4 12-17-2010 12:02 PM
jdk 1.5 for i386 on RHEL5 ?? vikas027 Linux - Software 5 09-27-2009 04:10 PM
Installing JDK from an .rpm on RHEL5 Ross Greenwood Linux - Newbie 2 07-09-2009 06:12 AM
JDK Installation. rehan999 Linux - Software 1 10-06-2008 08:42 AM
JDK installation pogopogo Linux - Software 2 10-19-2004 12:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 05:40 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
Open Source Consulting | Domain Registration