PDA

View Full Version : JAVA_HOME nor the JRE_HOME environment variable is defined



samlabs821
November 3rd, 2009, 06:52 AM
Hi there... who can help with problem... so let me show you what i have:
this is ~/.bashrc file:
export JAVA_HOME=/usr/lib/jdk1.6.0_16
export CLASSPATH=/home/samlabs821/tomcat/lib/jsp-api.jar:/home/samlabs821/tomcat/lib/servlet-api.jar

and this is my ~/.bash_profile:
JRE_HOME=/usr/lib/jdk1.6.0_16/jre/bin
JAVA_HOME=/usr/lib/jdk1.6.0_16

And i have this folders:

/usr/lib/jvm \\this is Suns JVM
/usr/lib/jdk1.6._16 \\this is Suns JDK

---------------

echo $JAVA_HOME is working but javac is not working...
java command is working..


what must i do plizzz helppp :(

jespdj
November 3rd, 2009, 11:06 AM
How did you install the JDK? Try this (instead of downloading and manually installing it):

sudo apt-get install sun-java6-jdk

Did you close and re-open a terminal after editing ~/.bashrc?

Ann.A
November 4th, 2009, 01:13 AM
Do you have your PATH variable pointing to the jdk's /bin ? Something like export PATH=${PATH}:${JAVA_HOME}/bin

GuillermoEllison
November 21st, 2009, 01:54 PM
samlabs821 (http://www.uluga.ubuntuforums.org/member.php?u=943857) maybe you have a wrong JRE_HOME, try rewriting it doing export JRE_HOME=/usr/lib/jdk1.6.0_16/jre or just nulling it.

Regards