LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Regarding Java on RHEL 5.2 (Tikanga) (https://www.linuxquestions.org/questions/linux-newbie-8/regarding-java-on-rhel-5-2-tikanga-4175458883/)

cjagdish69 04-20-2013 07:03 AM

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

knudfl 04-20-2013 09:39 AM

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.

-

cjagdish69 04-22-2013 04:37 AM

Java...
 
2 Attachment(s)
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

cjagdish69 04-22-2013 04:38 AM

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

knudfl 04-22-2013 07:17 AM

# 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".

-

cjagdish69 04-24-2013 12:59 AM

java updation.
 
1 Attachment(s)
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.

knudfl 04-24-2013 04:39 AM

# 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 .

-


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