我刚刚开始将NetBeans用于我的项目,我需要在GUI中使用一个仪表。我遇到了看起来非常有前途的Steelseries,并下载了这个JAR文件:
http://www.java2s.com/Code/Jar/s/DownloadSteelSeries3926jar.htm
我创建了一个Java项目,将库添加到其中,并添加了Swing调色板。
像Lightbulb
,Led
和TrafficLight
这样的bean很好用;但是当我选择一个仪表时,我得到了这个错误:
"无法加载组件类eu.hansolo.steelseries.extras.Radar JAR文件。班级本身被发现了,但是有一个问题 初始化它,例如由于静态初始化程序中的异常,或 无法加载组件类所需的其他类。"
异常堆栈跟踪如下:
java.lang.NoClassDefFoundError: org/pushingpixels/trident/ease/TimelineEase
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at org.netbeans.modules.form.project.ClassPathUtils.loadClass(ClassPathUtils.java:114)
at org.netbeans.modules.form.MetaComponentCreator$5.run(MetaComponentCreator.java:1450)
at org.netbeans.modules.form.FormLAF$2.run(FormLAF.java:293)
at org.netbeans.modules.openide.util.NbMutexEventProvider$Event.doEventAccess(NbMutexEventProvider.java:138)
at org.netbeans.modules.openide.util.NbMutexEventProvider$Event.readAccess(NbMutexEventProvider.java:98)
at org.netbeans.modules.openide.util.LazyMutexImplementation.readAccess(LazyMutexImplementation.java:94)
at org.openide.util.Mutex.readAccess(Mutex.java:250)
at org.netbeans.modules.form.FormLAF.executeWithLookAndFeel(FormLAF.java:276)
at org.netbeans.modules.form.MetaComponentCreator.prepareClass(MetaComponentCreator.java:1446)
at org.netbeans.modules.form.MetaComponentCreator.precreateVisualComponent(MetaComponentCreator.java:258)
at org.netbeans.modules.form.MetaComponentCreator.precreateVisualComponent(MetaComponentCreator.java:298)
at org.netbeans.modules.form.HandleLayer$NewComponentDrag.init(HandleLayer.java:3369)
at org.netbeans.modules.form.HandleLayer$NewComponentDrag.<init>(HandleLayer.java:3361)
at org.netbeans.modules.form.HandleLayer$NewComponentDropListener.dragEnter(HandleLayer.java:3658)
at java.awt.dnd.DropTarget.dragEnter(DropTarget.java:358)
at sun.awt.dnd.SunDropTargetContextPeer.processEnterMessage(SunDropTargetContextPeer.java:331)
at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchEnterEvent(SunDropTargetContextPeer.java:799)
at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchEvent(SunDropTargetContextPeer.java:767)
at sun.awt.dnd.SunDropTargetEvent.dispatch(SunDropTargetEvent.java:48)
at java.awt.Component.dispatchEventImpl(Component.java:4746)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4713)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.retargetMouseEnterExit(Container.java:4676)
at java.awt.LightweightDispatcher.trackDropTargetEnterExit(Container.java:4625)
at java.awt.LightweightDispatcher.trackMouseEnterExit(Container.java:4638)
at java.awt.LightweightDispatcher.processDropTargetEvent(Container.java:4591)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4461)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2750)
at java.awt.Component.dispatchEvent(Component.java:4713)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.ClassNotFoundException: org.pushingpixels.trident.ease.TimelineEase
at org.netbeans.modules.form.project.ProjectClassLoader.findClass(ProjectClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 52 more
答案 0 :(得分:1)
SteelSeries
托管的 Kenai
已移至GitHub
。该项目取决于Trident
库,如here和pom.xml
所示。
您是否也知道为什么
Steelseries
库缺少那些需要的模块?
您提到的link引用了预先构建的JAR文件,每个文件都排除了here所见的从属lib
目录或引用的工件引用here。您采取的确切方法取决于您的software configuration management计划。