简体   繁体   English

java .jar文件转换为.exe文件

[英]java .jar file convert to .exe file

I use launch4j to convert jar file to the exe file in Windows XP. 我使用launch4j将jar文件转换为Windows XP中的exe文件。

After I build wrapper, I go to test the wrapper. 在我构建包装器之后,我去测试包装器。
However, it shows ""Error : A JNI error has occurred ,please check your installation and try again" and "A Java Exception has occured". 但是,它显示“”错误:发生了JNI错误,请检查您的安装并再次尝试“并且”发生了Java异常“。

Below is the errors: 以下是错误:

Exception in thread "main" java.lang.NoClassDefFoundError: org/jdesktop/swingx/JXDatePicker
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.privateGetMethodRecursive(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
at sun.launcher.LauncherHelper.validateMainClass(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.jdesktop.swingx.JXDatePicker
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)
... 7 more

What does the errors say? 这些错误说的是什么? How should I do? 我应该怎么做?

You need to add a jar that contains the class 您需要添加包含该类的jar

  JXDatePicker

This is where you can get it from http://www.java2s.com/Code/Jar/s/Downloadswingx094jar.html 您可以从http://www.java2s.com/Code/Jar/s/Downloadswingx094jar.html获取它

Add it in the libraries, and link the path..It must not give this error. 将它添加到库中,并链接路径..不能给出此错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM