解决com.sun.tools.javac.Main is not on the classpath / Unable to find a javac compiler 的问题

来源:互联网 发布:阿里云服务器的主机名 编辑:程序博客网 时间:2024/04/25 07:20

用ant编译nutch时报错:

<span style="font-size:18px;">  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"</span>


我把jdk安装目录lib/tools.jar拷贝到上面那个报错的路径里,

<span style="font-size:18px;">sudo cp /usr/lib/jvm/java/lib/tools.jar /usr/lib/jvm/java-7-openjdk-amd64/jre/</span>

问题了解决~

0 0
原创粉丝点击