我刚开始将NetBeans用于我的一个项目,并且我的GUI中需要一个量规。我遇到了看起来非常有前途的Steelseries,并下载了以下JAR文件:

http://www.java2s.com/Code/Jar/s/DownloadSteelSeries3926jar.htm

我创建了一个Java项目,向其中添加了库,并添加了Swing面板。
某些豆,例如LightbulbLedTrafficLight可以正常工作。但是当我选择量规时,会出现以下错误:


  “无法从中加载组件类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

最佳答案

最初托管在SteelSeries上的Kenai已移至GitHub。该项目取决于Trident库和here中的pom.xml库。


  您还知道为什么Steelseries库缺少那些需要的模块吗?


您提到的link引用了预先构建的JAR文件,每个文件都排除了here中依赖的lib目录或引用的here中的工件引用。您所采用的确切方法将取决于您的software configuration management计划。

07-28 03:14