我的程序是使用Netbeans创建的,我需要创建一个.exe来使用innosetup创建一个安装文件,所以我用exe4j来创建exe。这是在完成所有步骤后在文本文件中生成的内容。
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError:
org/netbeans/lib/awtextra/AbsoluteLayout
at app.initComponents(app.java:78)
at app.<init>(app.java:39)
at Main$1.run(Main.java:32)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException:
org.netbeans.lib.awtextra.AbsoluteLayout
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 17 more
谢谢。
答案 0 :(得分:1)
验证运行时org.netbeans.lib.awtextra.AbsoluteLayout
中classpath
是否可用。您可以在NetBeans发行版中找到AbsoluteLayout.jar
,如下所示:
$ find . -name \*AbsoluteLayout\* ./Contents/Resources/NetBeans/java/modules/ext/AbsoluteLayout.jar ./Contents/Resources/NetBeans/java/sources/org/netbeans/lib/awtextra/AbsoluteLayout.java …