NoClassDefFoundError:无法初始化类com.jidesoft.swing.JideSwingUtilities

时间:2013-11-14 06:14:39

标签: java swing netbeans noclassdeffounderror jide

我正在使用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)

2 个答案:

答案 0 :(得分:1)

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

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

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

答案 1 :(得分:0)

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

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