LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 04-20-2013, 08:03 AM   #1
cjagdish69
Member
 
Registered: Oct 2003
Location: Bombay,Maharashtra,India
Posts: 60

Rep: Reputation: 15
Regarding Java on RHEL 5.2 (Tikanga)


I am using RHEL 5.2 (Tikanga) server. While installation of the OS all java packages were selected. Now output of command 'java --version' shows "java version "1.4.2"
gij (GNU libgcj) version 4.1.2 20071124 (Red Hat 4.1.2-42) "

I have downloaded "jdk-7u21-linux-i586.rpm" and installed with 'rpm -ivh jdk-7u21-linux-i586.rpm.

Then ln -s /usr/java/jre1.7.0_21 /usr/bin/java

Now if I check version of java as 'java --version' then it should show me the jre1.0.7_21 , but it is showing 'jre1.4.2'.

What should i do the installing the latest java ?

Jagdish
 
Old 04-20-2013, 10:39 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
Quote:
ln -s /usr/java/jre1.7.0_21 /usr/bin/java
Not supposed to work when you already have a link by name /usr/bin/java


http://www.if-not-true-then-false.co...-red-hat-rhel/

su - ( su<space><hyphen> )
alternatives --install /usr/bin/java java /usr/java/latest/jre/bin/java 20000
etc .

alternatives --config java
... and then select java 7.

-
 
Old 04-22-2013, 05:37 AM   #3
cjagdish69
Member
 
Registered: Oct 2003
Location: Bombay,Maharashtra,India
Posts: 60

Original Poster
Rep: Reputation: 15
Java...

Kindly have a look at the attachments...
The controlpanel of java shows jre1.7 is current...but the command 'java --version' shows 1.4.

How the output of the command is different ?

Jagdish
Attached Thumbnails
Click image for larger version

Name:	Screenshot.png
Views:	14
Size:	90.9 KB
ID:	12372   Click image for larger version

Name:	Screenshot-1.png
Views:	10
Size:	63.5 KB
ID:	12373  
 
Old 04-22-2013, 05:38 AM   #4
cjagdish69
Member
 
Registered: Oct 2003
Location: Bombay,Maharashtra,India
Posts: 60

Original Poster
Rep: Reputation: 15
Kindly have a look at the attachments...
The controlpanel of java shows jre1.7 is current...but the command 'java --version' shows 1.4.

How the output of the command is different ?

Jagdish
 
Old 04-22-2013, 08:17 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
# 4.

#3: Looks like you are starting the GUI inside jre1.7 ?
#3: The most important information is missing :
The command(s) in the terminal : Starting the ./ControlPa...


Setting a java version : 1) su
2) /usr/sbin/alternatives --config java
... And then select the "Sun/Oracle Java 1.7".

-

Last edited by knudfl; 04-22-2013 at 08:19 AM.
 
Old 04-24-2013, 01:59 AM   #6
cjagdish69
Member
 
Registered: Oct 2003
Location: Bombay,Maharashtra,India
Posts: 60

Original Poster
Rep: Reputation: 15
java updation.

Kindly have a look at the output of the command /usr/sbin/alternative --config java

It is only showing java 1.4., though i have installed jdk-7u21-linux-i586.rpm

Kindly suggest.

Jagdish.
Attached Thumbnails
Click image for larger version

Name:	Screenshot.png
Views:	10
Size:	209.9 KB
ID:	12388  
 
Old 04-24-2013, 05:39 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
# 6.

You have probably forgotten to install what's described in post # 2.

This is the basic install of the java link : 1) su
2)
/usr/sbin/alternatives --install /usr/bin/java java /usr/java/jdk1.7.0_21/jre/bin/java 2


You will of course have to check what you actually have : ( path, file names ) :
/usr/java/jdk1.7.0_21/jre/bin/java may be right with 7u21 .

-
 
  


Reply


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
Unable to install gedit-plugins-2.16.0 on RHEL 5.7 (Tikanga) imperialguy Linux - Software 1 07-27-2012 01:35 AM
RHEL 5.6 Tikanga - New to Linux and don't have uncompress johnmccarthy Linux - Newbie 2 07-18-2011 11:40 AM
RHEL 5 (Tikanga) Using Yum to install packages dg1988 Red Hat 4 04-13-2011 03:17 PM
RHEL 5.4 (Tikanga) on "HP Proliant 380 G6" down, "kernel: Uhhuh. NMI received. ...." pkhera_2001 Linux - Hardware 12 09-01-2010 04:37 AM
[SOLVED] vgdisplay -v -D results in invalid option -D in rhel 5.5(tikanga) hartajdugal Linux - Newbie 6 07-16-2010 11:57 AM


All times are GMT -5. The time now is 01:09 PM.

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