我正在尝试使用build.fxbuild文件在e(fx)clipse中构建JavaFX应用程序。不幸的是,蚂蚁抱怨说找不到tools.jar
。但是tools.jar
是从Java 9开始删除的(实际上我是在使用Java 10),因此无法将其添加到Preferences > Ant > Runtime > Classpath
中的ant classpath中。控制台上的实际错误消息是:
BUILD FAILED
<project_directory>\build\build.xml:59: 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 "C:\Program Files\Java\jre-10.0.1"
我的JAVA_HOME环境变量也设置为指向JDK 10,它也包含在PATH中,所以我也不理解最后一行。在这种情况下我该怎么办?
答案 0 :(得分:1)
TL;DR - update your Eclipse / e(fx)clipse installation.
According1 to this blog posting e(fx)clipse 3.0.0 supports Java 9. (Apparently a lot of changes were required to get rid of dependencies on Oracle implementation classes.)
The Eclipse project page for e(fx)clipse 3.0.0 says that:
There is no specific mention of releases supporting Java 10 or later (yet), but another blog post talks about how e(fx)clipse will have to cope with JavaFX11 being unbundled from the standard Java SE distributions.
1 - I am not in a position to validate this information ...
答案 1 :(得分:0)