2

我目前正在使用 jide 库处理我的旧项目,我使用 netbeans 作为我的 IDE,一年前在 Windows 7 中使用它时它运行良好。

目前我正在使用 OS X Mavericks 并使用 netbeans 7.2.1,当我尝试从调色板管理器中拖动组件时出现此错误。

有没有人也遇到这种情况?

编辑:

添加了错误日志:

java.lang.NoClassDefFoundError: Could not initialize class com.jidesoft.swing.JideSwingUtilities
    at com.jidesoft.swing.Searchable.installListeners(Unknown Source)
    at com.jidesoft.swing.Searchable.<init>(Unknown Source)
    at com.jidesoft.swing.ComboBoxSearchable.<init>(Unknown Source)
    at com.jidesoft.swing.AutoCompletion.<init>(Unknown Source)
    at com.jidesoft.swing.AutoCompletionComboBox.createAutoCompletion(Unknown Source)
    at com.jidesoft.swing.AutoCompletionComboBox.initComponents(Unknown Source)
    at com.jidesoft.swing.AutoCompletionComboBox.<init>(Unknown Source)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at java.lang.Class.newInstance(Class.java:374)
    at org.netbeans.modules.form.CreationFactory.createDefaultInstance(CreationFactory.java:178)
    at org.netbeans.modules.form.RADComponent.createBeanInstance(RADComponent.java:252)
    at org.netbeans.modules.form.RADComponent.initInstance(RADComponent.java:191)
    at org.netbeans.modules.form.MetaComponentCreator.initComponentInstance(MetaComponentCreator.java:1508)
    at org.netbeans.modules.form.MetaComponentCreator.createVisualComponent(MetaComponentCreator.java:975)
    at org.netbeans.modules.form.MetaComponentCreator.access$300(MetaComponentCreator.java:79)
    at org.netbeans.modules.form.MetaComponentCreator$2.run(MetaComponentCreator.java:286)
    at org.netbeans.modules.form.FormLAF$2.run(FormLAF.java:293)
    at org.openide.util.Mutex.doEventAccess(Mutex.java:1368)
    at org.openide.util.Mutex.readAccess(Mutex.java:327)
    at org.netbeans.modules.form.FormLAF.executeWithLookAndFeel(FormLAF.java:276)
    at org.netbeans.modules.form.MetaComponentCreator.precreateVisualComponent(MetaComponentCreator.java:283)
    at org.netbeans.modules.form.MetaComponentCreator.precreateVisualComponent(MetaComponentCreator.java:306)
    at org.netbeans.modules.form.HandleLayer$NewComponentDrag.init(HandleLayer.java:3367)
    at org.netbeans.modules.form.HandleLayer$NewComponentDrag.<init>(HandleLayer.java:3359)
    at org.netbeans.modules.form.HandleLayer.mouseMoved(HandleLayer.java:2167)
    at java.awt.Component.processMouseMotionEvent(Component.java:6550)
    at javax.swing.JComponent.processMouseMotionEvent(JComponent.java:3338)
    at java.awt.Component.processEvent(Component.java:6274)
    at java.awt.Container.processEvent(Container.java:2229)
    at java.awt.Component.dispatchEventImpl(Component.java:4861)
    at java.awt.Container.dispatchEventImpl(Container.java:2287)
    at java.awt.Component.dispatchEvent(Component.java:4687)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4505)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
    at java.awt.Container.dispatchEventImpl(Container.java:2273)
    at java.awt.Window.dispatchEventImpl(Window.java:2719)
    at java.awt.Component.dispatchEvent(Component.java:4687)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
    at java.awt.EventQueue.access$200(EventQueue.java:103)
    at java.awt.EventQueue$3.run(EventQueue.java:694)
    at java.awt.EventQueue$3.run(EventQueue.java:692)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
    at java.awt.EventQueue$4.run(EventQueue.java:708)
    at java.awt.EventQueue$4.run(EventQueue.java:706)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
    at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
4

2 回答 2

1

您收到此错误是因为您的代码是针对 JDK1.6 编译的,但您的运行时不是。就我而言,它是 JRE1.7

您可以通过确保 JRE 和 JDK 是相同的版本来解决此问题。

对我来说,我将 eclipse 运行配置从 1.7(默认)更改为 1.6

于 2015-05-08T00:23:46.543 回答
0

NoClassDefFoundError 发生在编译期间存在类定义但该类在运行时丢失或未初始化时。对于您的情况,请验证您的类路径中是否有一个版本 jide-oss-*.*.*.jar。如果是,那么您可以在这里看到更多的可能性:

http://javareferencegv.blogspot.com/2013/10/debugging-javalangnoclassdeffounderror.html

于 2013-11-14T19:32:49.567 回答