LinuxQuestions.org
Review your favorite Linux distribution.
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 09-24-2012, 02:41 PM   #1
econ8193
LQ Newbie
 
Registered: Sep 2012
Posts: 8

Rep: Reputation: Disabled
Clarification setting environmental Variables JAVA_Home and JDK_HOME


Currently having issues with a software installation script finding the correct JRE on my Linux redhat enterprise 5 64 bit operating system. before the installation I test echo $JAVA_HOME returning /usr/java/jre1.6.0_31 also testing "which java" which returns /usr/bin/java.
during the installation added -is:log and returned the following file contents:

Log file created by ISMP installer @Mon Sep 24 13:40:06 CDT 2012
INSTALLER_PATH=/opt/80dev/./osasinstall.sh
Checking the environment variables specifed in the JVM files to find the JVM...
Verifying... /usr/bin/java -cp /root/istemp1359268134006/Verify.jar Verify java.version
$JDK_HOME is not defined in the shell environment specifed in the JVM FILE jre1.6.X.genericunix.jvm
$JAVAHOME is not defined in the shell environment specifed in the JVM FILE jre1.6.X.genericunix.jvm
A jvm found at /usr/java/jre1.6.0_31/bin/java
Verifying... /usr/java/jre1.6.0_31/bin/java -cp /root/istemp1359268134006/Verify.jar Verify java.version
Verification failed for /usr/java/jre1.6.0_31/bin/java using the JVM file /root/istemp1359268134006/jre1.6.X.genericunix.jvm.
No JVM can be found using the shell environment variable. Searching JVM will continue with Path Hints specified in the JVM Files...
--------------------------------------------------------------------------------------------
Searching a JVM using /root/istemp1359268134006/jre1.6.X.genericunix.jvm
Verifying... /usr/java/jdk1.6.0_35/bin/java -cp /root/istemp1359268134006/Verify.jar Verify java.version
Verification failed for /usr/java/jdk1.6.0_35/bin/java using the JVM file /root/istemp1359268134006/jre1.6.X.genericunix.jvm.
Verifying... /usr/java/jre1.6.0_31/bin/java -cp /root/istemp1359268134006/Verify.jar Verify java.version
Verification failed for /usr/java/jre1.6.0_31/bin/java using the JVM file /root/istemp1359268134006/jre1.6.X.genericunix.jvm.
My first question might be where is it looking for the noted environmental variables? Second would be the syntax for changes as I am new and unsure what and where in the necessary files to edit.
Thanks for any applicable advice.
 
Old 09-25-2012, 07:16 AM   #2
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
Installing the latest version = jdk-1.6.0_35 :
# yum localinstall --nogpgcheck jdk-1.6.0_35-fcs.x86_64.rpm

Download link http://ftp.scientificlinux.org/linux...fcs.x86_64.rpm

Setting up the new java : 1) su
2)
/usr/sbin/alternatives --install /usr/bin/java java /usr/java/jdk1.6.0_35/bin/java 2

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

The selected version can be checked with : $ java -version

.

Last edited by knudfl; 09-25-2012 at 07:39 AM.
 
  


Reply

Tags
jdk6


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
Setting environmental variables when installing ns2 on fedora 15 Narges Linux - Newbie 19 09-05-2012 04:54 AM
Sun Grid Engine: setting environmental variables coenvh Linux - General 0 03-19-2010 05:14 AM
setting environmental variables permanently geetha_sg Slackware 6 08-10-2008 05:14 PM
Setting environmental variables Ninju Linux - Newbie 3 09-25-2007 04:29 PM
Setting environmental variables in mandrake inprogress Linux - Newbie 4 06-07-2003 08:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:58 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