0

我的程序是使用 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

谢谢你。

4

1 回答 1

1

验证在运行时org.netbeans.lib.awtextra.AbsoluteLayout可用。classpath您可以AbsoluteLayout.jar在 NetBeans 发行版中找到,如下所示:

$查找。-name \*AbsoluteLayout\*
./Contents/Resources/NetBeans/java/modules/ext/AbsoluteLayout.jar
./Contents/Resources/NetBeans/java/sources/org/netbeans/lib/awtextra/AbsoluteLayout.java
…
于 2013-08-17T15:17:13.353 回答