我的系统是CentOS 6.4。我正在尝试构建的软件包是OpenGTS的最新版本。我遇到的问题是,在执行 ant all 后,我得到以下输出:
[root@OpenGTS OpenGTS_2.5.0]# ant all
Buildfile: /usr/local/OpenGTS_2.5.0/build.xml
clean:
[delete] Deleting directory /usr/local/OpenGTS_2.5.0/build
custom.jar:
[echo] Skipping General Custom build ...
customtrack.jar:
[echo] Skipping Track Custom build ...
custom:
prepare:
[mkdir] Created dir: /usr/local/OpenGTS_2.5.0/build
[mkdir] Created dir: /usr/local/OpenGTS_2.5.0/build/lib
[echo] OS = Linux
[echo] JavaHome = /usr/lib/jvm/java-1.6.0-openjdk/jre
BUILD FAILED
/usr/local/OpenGTS_2.5.0/build.xml:182: Execute failed: java.io.IOException: Cannot run program "java" (in directory "/usr/lib/jvm/java-1.6.0-openjdk/jre"): java. io.IOException: error=2, No such file or directory
我的环境变量都是正确定义的,但据我所知,构建要在jre目录中执行 java 。目前,我只能从二进制目录中执行它。我应该修改.bashrc所以我可以从任何目录执行 java 吗?提前谢谢。
答案 0 :(得分:1)
将PATH设置为包含jdk / bin文件夹