I have already done my homework before posting this question. I am trying to build Portico-1.0.2 on Red-Hat Linux 64 bit machine using apache ant. Initially I was setting JAVA_HOME path to jre-1.6.0_31/bin folder but it threw an error that : Unable to locate tools.jar. Expected to find it in jre1.6.0_31/lib/tools.jar.
Then after exploring stackoverflow I found few posts explaining to install jdk and set its folder as the JAVA_HOME path. So I have installed Jdk-1.6.0 in Redhat Linux and after installing jdk I located tools.jar file in it's lib folder. Now when I set the JAVA_HOME path to : /usr/lib/jvm/jre-1.6.0-openjdk.x86_64, it throws an error : portico-1.0.2/codebase/build.xml:55: The JAVA_HOME environment variable must be set
But I have set the JAVA_HOME in .bashrc file as follows :
JAVA_HOME=/usr/lib/jvm/jre-1.6.0-openjdk.x86_64
PATH=$JAVA_HOME:$PATH
I am not sure what to do. Any advice on how to solve this problem.
Confusingly the JDK also contains a JRE, the latter you've set as JAVA_HOME thereby repeating your problem...
The Red hat docs describe how to set the JAVA_HOME