0
我正在Ubuntu上使用Apache Ant構建aprofplot。當我在包含build.xml的文件夾中輸入命令ant時,出現此錯誤:在Ubuntu上使用Ant「無法找到javac編譯器」錯誤
BUILD FAILED
/home/ashwin/aprof/aprofplot/nbproject/build-impl.xml:923: The following error occurred while executing this line:
/home/ashwin/aprof/aprofplot/nbproject/build-impl.xml:263: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "/usr/lib/jvm/java-7-openjdk-amd64/jre"
Total time: 2 seconds
[email protected]:~/aprof/aprofplot$ javac --version
The program 'javac' can be found in the following packages:
* default-jdk
* ecj
* gcj-4.8-jdk
* openjdk-7-jdk
* gcj-4.6-jdk
* openjdk-6-jdk
我也安裝了openjdk。我究竟做錯了什麼?我是否需要安裝更多軟件包?
請參見[如何在Ubuntu上安裝JDK?](http://stackoverflow.com/questions/14788345/how-to-install-jdk-on-ubuntu-linux/14788468# 14788468)。特別是關於'export JAVA_HOME'的說明很重要。 –
我猜想這些庫鏈接不正確。我使用netbeans來運行應用程序。它運行時沒有任何錯誤/構建失敗。 – chrisrhyno2003