LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-10-2008, 05:43 AM   #1
shahz
Member
 
Registered: Sep 2006
Location: Quetta, Pakistan
Distribution: RHEL, Ubuntu, Fedora
Posts: 368

Rep: Reputation: 29
Java Run Time Environment


I have installed jre within Red Hat Enterprise linux. its successfully installed, when I run the command

#java -version I get the following.

java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) Server VM (build 10.0-b23, mixed mode)


but when I start installing greenstone I get for now this error I think it have some thing with path can any body help me.

This application requires a Java Run Time Environment (JRE)
to run. Searching for one on your computer was not successful.
Please use the command line switch -is:javahome to specify
a valid JRE. For more help use the option -is:help.


I know that the jre is installed I think I have to do something with javahome. ???????


thanks
shahz
 
Old 07-10-2008, 06:14 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Have you checked that the location of the java binaries is in your PATH variable? To check, enter this in a terminal:

echo $PATH
 
Old 07-10-2008, 06:40 AM   #3
shahz
Member
 
Registered: Sep 2006
Location: Quetta, Pakistan
Distribution: RHEL, Ubuntu, Fedora
Posts: 368

Original Poster
Rep: Reputation: 29
#echo $PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin


I added this to my path and now path looks like this way

#PATH=$PATH:/usr/java/jre1.6.0_07/bin/java

after this the

#echo $PATH (looks like this)

usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin:/usr/java/jre1.6.0_07/bin/java

but still the same error I searched for java with the following command and got this lisiting.

#find / -name java

/etc/java
/usr/bin/java
/usr/share/doc/libidn-devel-0.5.6/contrib/java
/usr/share/doc/db4-devel-4.2.52/ref/java
/usr/share/apps/kdevfilecreate/file-templates/java
/usr/share/apps/kdevappwizard/imports/java
/usr/share/javadoc/java
/usr/share/java
/usr/lib/swig1.3/java
/usr/lib/gcc/i386-redhat-linux/3.4.3/include/gnu/java
/usr/lib/gcc/i386-redhat-linux/3.4.3/include/java
/usr/lib/java
/usr/java
/usr/java/jre1.6.0_07/bin/java
/home/najo/gsdl-2.80-unix/gsdl/bin/java
/home/najo/gsdl-2.80-unix/src/src/java

did I gave the right command for the binary or not.

thanks for help

shahz
 
Old 07-10-2008, 06:54 AM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
I think you don't want that last "java" in the PATH. PATH should contain only the directory path, not the final file to be run.

Here is the relevant stuff from my machine:
Code:
[mherring@localhost bin]$ find /usr -name java
/usr/share/fonts/java
/usr/share/java
/usr/lib/jvm/java-1.6.0-sun-1.6.0/jre/bin/java
/usr/lib/ooo-2.2/share/Scripts/java
/usr/bin/java

[mherring@localhost bin]$ echo $PATH
/usr/bin:/bin:/usr/local/bin:/usr/X11R6/bin/:sbin:/usr/sbin:/usr/games:/usr/lib/qt3//bin:/home/mherring/bin:/usr/lib/qt3//bin
Note that the only relevant entry in PATH is "/usr/bin"
 
Old 07-10-2008, 07:01 AM   #5
shahz
Member
 
Registered: Sep 2006
Location: Quetta, Pakistan
Distribution: RHEL, Ubuntu, Fedora
Posts: 368

Original Poster
Rep: Reputation: 29
Quote:
Originally Posted by pixellany View Post
[/CODE]Note that the only relevant entry in PATH is "/usr/bin"

tried the /usr/bin also with the command.

#PATH=$PATH:/usr/bin

but still get the same error



thanks
shahz
 
Old 07-10-2008, 07:07 AM   #6
shahz
Member
 
Registered: Sep 2006
Location: Quetta, Pakistan
Distribution: RHEL, Ubuntu, Fedora
Posts: 368

Original Poster
Rep: Reputation: 29
and one more thing if I say

#which java (it says /usr/bin/java)

#rpm -qf /usr/bin/java
file /usr/bin/java is not owned by any package


thanks
shahz
 
Old 07-12-2008, 12:07 AM   #7
shahz
Member
 
Registered: Sep 2006
Location: Quetta, Pakistan
Distribution: RHEL, Ubuntu, Fedora
Posts: 368

Original Poster
Rep: Reputation: 29
thanks pixellany

it finally works I had the path problem, but it works with 1.5 not with 1.6

thank you very much.


thanks
shahz
 
Old 07-12-2008, 06:59 AM   #8
williebens
Member
 
Registered: Jan 2008
Posts: 88

Rep: Reputation: 16
Hello guys:

To follow this thread, I will post how I got the java 1.6 path working on my Centos 5.0 box.
This is just in case someone needs this reference.

Set the JAVA_HOME environment variable to /usr/java/jdk1.6.0_06:

Indeed, there is more than one way of doing this. I chose to do it by creating a file
under the /etc/profile.d directory with the following content:

#This file was created
#to add the environment variable $JAVA_HOME
#to this system with the location of the JDK.
#This is for the use of the JDK environment
#for all users.

JAVA_HOME=/usr/java/jdk1.6.0_06
export JAVA_HOME
PATH=$JAVA_HOME/bin:$PATH
export PATH

I called this file tomcat_env.sh because I was installing tomcat 6.0 and it needed the java 1.6 environement, but you can call it anything you want. You need to make it executable by running the following command:

[root@linuxbox profile.d]# chmod +x tomcat_env.sh

Now check its permissions. You should get:
[root@linuxbox profile.d]# ls –l
-rwxr-xr-x 1 root root 288 May 1 13:47 tomcat_env.sh

Run the tomcat_env.sh file to se the environment variable:
[root@linuxbox profile.d]# ./tomcat_env.sh

Verify it is set by running the echo command:

[root@linuxbox profile.d]# echo $JAVA_HOME
/usr/java/jdk1.6.0_06/
[root@linuxbox profile.d]#

[root@linuxbox profile.d]# echo $PATH
/usr/java/jdk1.6.0_06/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/lo
cal/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bi n:/root/bin
[root@linuxbox profile.d]#

Last edited by williebens; 07-12-2008 at 07:00 AM.
 
Old 07-13-2008, 11:43 PM   #9
shahz
Member
 
Registered: Sep 2006
Location: Quetta, Pakistan
Distribution: RHEL, Ubuntu, Fedora
Posts: 368

Original Poster
Rep: Reputation: 29
dear williebens

I also was able to install 1.6 but what was the problem that my software with 1.6 was having some problem thats why I was happy with 1.5 any how thanks


shahz
 
  


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
Java Run Time on FC6 knockout_artist Linux - Newbie 4 02-07-2008 07:34 AM
installing Java Run Environment kypbre Linux - Software 1 07-12-2007 05:34 AM
Mozilla Java Run Time karyoker Linux - Software 6 02-26-2007 06:30 PM
Java Run Time Environment. leonardo38 Linux - Software 3 05-12-2006 10:17 AM
mozilla & java run time environment(applet) shivaligupta Linux - Software 0 02-23-2005 09:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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