ant找不到tools.jar问题解决

Java 发表评论

debian下使用ant命令提示

Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-6-openjdk-i386/lib/tools.jar
Buildfile: /opt/splunk-sdk-java-1.3.1/build.xml


build:


BUILD FAILED
/opt/splunk-sdk-java-1.3.1/build.xml:60: 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-6-openjdk-i386/jre"


Total time: 0 seconds

解决方案:

安装jdk工具包:使用命令apt-get install openjdk-6-jdk

然后ant通过

发表评论

电子邮件地址不会被公开。 必填项已用*标注

昵称 *