JavaFX:更新到Java 9后出现奇怪的ClassNotFoundException [英] JavaFX: Weird ClassNotFoundException after updating to Java 9
问题描述
我在Java 8中启动了一个Maven项目,并希望将其迁移到Java 9.同时我也从Eclipse Neon EE转到Eclipse Oxygen EE。 (重新安装JFX SDK)。
虽然Eclipse Workspace没有显示错误;一旦我尝试编译并运行以前在Java 8中运行完全正常的完全相同的程序,我得到以下例外:
I started a Maven project in Java 8 and wanted to migrate it to Java 9. At the same time I also went from Eclipse Neon EE to Eclipse Oxygen EE. (JFX SDK reinstalled). While the Eclipse Workspace shows no errors; as soon as I try to compile and run the exact same program that used to run perfectly fine in Java 8, I get the following Exception:
{...}
Caused by: java.lang.ClassNotFoundException: com.sun.javafx.css.converters.PaintConverter
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
... 26 more
异常运行的应用程序应用程序。主要
Exception running application application.Main
我现在已经多次重建项目而无法让它工作......
I have now rebuilt the project several times and cannot get it to work...
推荐答案
在Java 9 中,上一个内部类
com.sun.javafx.css.converters.PaintConverter
公开为
javafx.css.converte r .PaintConverter
在模块中 javafx.graphics
。
javafx.css.converter.PaintConverter
in the module javafx.graphics
.
参见 Javadoc - Class PaintConverter 。
JFoenix supports Java 9 with a separate JAR.
这篇关于JavaFX:更新到Java 9后出现奇怪的ClassNotFoundException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!