问题
I've just plainly imported the jar files and this error has appeared. I've tried multiple ways online but couldn't solve it.
This is the classpath that i've imported.
回答1:
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:
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.
See blog post Prepare for JDK 9 by Yolande Poirier (emphasis by me):
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.
来源:https://stackoverflow.com/questions/47789849/eclipse-classnotfoundexception-with-imported-jar-files