如你看到的:
我添加jni4net.j-0.8.6.0.jar
到我引用的库中,但我仍然收到java.lang.NoClassDefFoundError
异常:
java.lang.NoClassDefFoundError: net/sf/jni4net/Bridge
at sibeclipseplugin.debug.DebuggerInterface.initialize(DebuggerInterface.java:15)
at sibeclipseplugin.debug.SibDebugTarget.<init>(SibDebugTarget.java:65)
at sibeclipseplugin.ui.launch.LaunchConfigurationDelegate.launch(LaunchConfigurationDelegate.java:30)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:858)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:707)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1018)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1222)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Caused by: java.lang.ClassNotFoundException: net.sf.jni4net.Bridge cannot be found by SIBEclipsePlugin_0.0.0.1
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 8 more
我不知道问题是什么。当我将项目作为 Eclipse-Application 启动时,它找不到该类。在普通的 Java 项目中运行相同的代码是可行的。
有人知道如何解决这个问题吗?