我正在使用exe4j并且我正在尝试生成一个exe文件,生成后我尝试执行但不起作用。
这里的问题
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/joda/time/ReadableInstant
at iguana.Principal.<init>(Principal.java:69)
at iguana.Principal$32.run(Principal.java:1187)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(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.joda.time.ReadableInstant
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)
... 16 more
有什么想法吗?
答案 0 :(得分:4)
看起来你错过了一个joda-time课程。我唯一的想法可能是你错过了它的库,可以在这里下载: http://joda-time.sourceforge.net/ 或者,如果您像我一样使用maven,请添加:
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.0</version>
</dependency>
到您的POM文件。
希望这有帮助!
答案 1 :(得分:2)
看起来您从可执行文件中删除了一个库。它无法找到org.joda.time包。
有两种可能的解决方案:
Here是exe4j帮助页面,显示了如何编辑类路径。