Operating System - HP-UX
1822895 Members
3879 Online
109645 Solutions
New Discussion юеВ

The JAVA_HOME environment variable is not defined correctly

 
SOLVED
Go to solution
Boon khiang Sim
Advisor

The JAVA_HOME environment variable is not defined correctly

Hi , I have downloaded Java SDK 1.4.2_04 from HP site and I have completed the installation & set my environment.

Try both ways in my ENV.
1) JAVA_HOME=/opt/java1.4/bin;export JAVA_HOME
2) JAVAHOME=/opt/java1.4/jre; export JAVAHOME
3) PATH=$PATH:$JAVA_HOME/bin; export PATH

When I run my program, it show the following:-

$ The JAVA_HOME environment variable is not defined correctly
This environment variable is needed to run this program.

$ which java
/opt/java1.4/bin/java


What can I do to make it work?


Thanks,
Sim
4 REPLIES 4
Sridhar Bhaskarla
Honored Contributor
Solution

Re: The JAVA_HOME environment variable is not defined correctly

Hi,

I believe you should be setting your JAVA_HOME variable to /opt/java1.4/jre.

try

JAVA_HOME=/opt/java1.4/jre;export JAVA_HOME

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Sridhar Bhaskarla
Honored Contributor

Re: The JAVA_HOME environment variable is not defined correctly

Hi Sim,

Hmm..I backtrack.. Try JAVA_HOME=/opt/java1.4.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Boon khiang Sim
Advisor

Re: The JAVA_HOME environment variable is not defined correctly

Hi Sri,

Tried both your methods but still get the same error.

regards,
Sim
Boon khiang Sim
Advisor

Re: The JAVA_HOME environment variable is not defined correctly

Hi Sri,

Thanks, I have managed to get it work by modifying my program script.

Thanks,
Sim