带有导入的 jar 文件的 Eclipse classnotfoundexception

Eclipse classnotfoundexception with imported jar files

我明明导入了jar文件就出现了这个错误。网上试了很多方法都解决不了。

这是我导入的类路径。

在JDK9中,包含接口org.omg.CORBA.portable.IDLEntityis not resolved by default的模块java.corba必须手动添加:

将模块 java.corba 添加到 明确包含的模块 作为 或使用 Java 8 JRE/JDK.

参见blog post Prepare for JDK 9 by Yolande Poirier(我强调):

Six Java EE libraries in JDK are no longer shared by default in JDK 9. Those Java EE deprecated APIs are java.corba, java.transaction, java.activation, java.xml.bind, java.xml.ws, java.xml.ws.annotation. They have been deprecated in JDK 9 and will be removed in a future release. They are disabled by default in JDK 9. Their packages will not compile in Java 9 and give an error message. The documentation gives you migration options to enable those libraries in JDK 9. This should be a temporary solution because they are scheduled to be removed in a future release.