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 |
Have you checked that the location of the java binaries is in your PATH variable? To check, enter this in a terminal:
echo $PATH |
#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 |
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 |
Quote:
tried the /usr/bin also with the command. #PATH=$PATH:/usr/bin but still get the same error thanks shahz |
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 |
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 |
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]# |
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 |
All times are GMT -5. The time now is 10:41 PM. |