Results 1 to 2 of 2
Hello,
I have problems with setting my JAVA_HOME variable. I am using Slackware 12.0, bash shell. I have set JAVA_HOME in my /etc/profile, like this:
JAVA_HOME=/home/username/programs/jdk1.6.0_7/bin:$JAVA_HOME
export JAVA_HOME
but when ...
- 01-10-2009 #1Just Joined!
- Join Date
- Sep 2008
- Posts
- 32
How to set JAVA_HOME properly?
Hello,
I have problems with setting my JAVA_HOME variable. I am using Slackware 12.0, bash shell. I have set JAVA_HOME in my /etc/profile, like this:
JAVA_HOME=/home/username/programs/jdk1.6.0_7/bin:$JAVA_HOME
export JAVA_HOME
but when I login in with my user name and type env on the command line, I get for JAVA_HOME the following:
JAVA_HOME=/usr/lib/java
Also, in my /etc/profile I have put the path to my java in the PATH variable, like this:
PATH=/home/username/programs/jdk1.6.0_7/bin:/usr/local/bin:$PATH
and when I type env when I login, then the PATH variable contains correctly the path to the jdk (as I have put it into /etc/profile).
I expect that after I have set everything as I want in /etc/profile, and restart the computer then what I have set will be relevant and when I login and type env, I will get values to the variables equal to those I have set in /etc/profile. Why it does not happen?
I have particularly a problem with a Java application, which I want to run. When I type ant, I get:
error: JAVA_HOME is not defined correctly.
We cannot execute /usr/lib/java/bin/java.
Thanks a lot.
Regards
- 01-11-2009 #2
Please post your thread in only one forum. This thread is closed because its a duplicate.


