Ant编译时报错,内容如下:

com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "D:\Java_Tools\Java\jre7"

解决,需要指定Eclipse编译时JREs,根据提示,应指定到JDK

如下图,点击window--> preferences--> Java --> Installed JREs ,点击Add,选择电脑中安装的jdk路径,此处选择jdk路径而不是jre路径,然后勾选新增加的jdk,确定,重新编译即可。

Eclipse使用Ant编译时报错Perhaps JAVA_HOME does not point to the JDK

 

相关文章:

  • 2021-06-08
  • 2022-12-23
  • 2022-01-06
  • 2022-12-23
  • 2022-01-14
  • 2022-12-23
  • 2021-11-20
  • 2021-11-27
猜你喜欢
  • 2021-06-24
  • 2021-04-09
  • 2022-12-23
  • 2022-12-23
  • 2021-09-07
  • 2022-12-23
  • 2021-06-26
相关资源
相似解决方案