简体   繁体   中英

java .jar file convert to .exe file

I use launch4j to convert jar file to the exe file in Windows XP.

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".

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

  JXDatePicker

This is where you can get it from http://www.java2s.com/Code/Jar/s/Downloadswingx094jar.html

Add it in the libraries, and link the path..It must not give this error.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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