带有导入的jar文件的Eclipse classnotfoundexception [英] Eclipse classnotfoundexception with imported jar files
问题描述
我刚刚导入了jar文件,并且出现了此错误。我尝试了多种在线方法,但无法解决。
I've just plainly imported the jar files and this error has appeared. I've tried multiple ways online but couldn't solve it.
这是我导入的类路径。
推荐答案
在JDK 9中,模块 java.corba
包含接口 org.omg.CORBA.portable.IDLEntity
不能解决默认,并且必须手动添加:
In JDK 9, the module java.corba
which contains the interface org.omg.CORBA.portable.IDLEntity
is not resolved by default and has to be manually added:
将模块 java.corba
添加到明确包含的模块 ,如在此答案中针对 java.xml所述.bind
或使用Java 8 JRE / J DK。
Add the module java.corba
to the Explicitly included modules as described in this answer for java.xml.bind
or use a Java 8 JRE/JDK.
请参见博客文章为JDK 9做准备,作者Yolande Poirier (我强调):
See blog post Prepare for JDK 9 by Yolande Poirier (emphasis by me):
JDK 9中不再默认共享JDK中的六个Java EE库。
不推荐使用Java EE的API是java.corba
,java.transaction
,
java.activation
,java.xml.bind
,java.xml.ws
,java.xml.ws.annotation
。
它们已在JDK 9中弃用,并将在以后的
版本中删除。在JDK 9中默认禁用它们。它们的包
在Java 9中不会编译并给出错误消息。 文档
为您提供了迁移选项,以启用JDK 9中的那些库。此
应该是一个临时解决方案,因为按计划将在将来的版本中删除它们$ 。
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.
这篇关于带有导入的jar文件的Eclipse classnotfoundexception的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!