1

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?

Michael Kuan
  • 1,085
  • 3
  • 10
  • 28

1 Answers1

3

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.

Danyal Sandeelo
  • 12,196
  • 10
  • 47
  • 78