0

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.

4

2 回答 2

0

令人困惑的是,JDK 还包含一个 JRE,后者您已设置为 JAVA_HOME 从而重复您的问题......

Red hat 文档描述了如何设置 JAVA_HOME

于 2012-05-26T07:53:47.423 回答
0

您好,打开根目录中的 bashrc 文件并将路径添加到您的 jdk,您就可以开始了..

例如

导出 JAVA_HOME=/usr/java/jdk1.6.0_19

导出 PATH=$PATH:$JAVA_HOME/bin

于 2013-11-20T07:01:29.233 回答