问题
My context:
- 9-ea-113 (that is javafx now fully modularized, without jfrt.jar)
- eclipse-neon-M6 with the current beta support for java9 (running on java8, if that matters)
- win7
Something simple like
import javafx.application.Application;
public class FirstApplication extends Application {
//
}
doesn't compile because the javafx.xx packages are not found.
What to do?
回答1:
Edit the .classpath file of the project and add the entry below - seems to work.
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<accessrules>
<accessrule kind="accessible" pattern="javafx/**"/>
</accessrules>
</classpathentry>
来源:https://stackoverflow.com/questions/36934391/eclipse-java9-jigsaw-how-to-access-javafx-packages