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