0

When i run my maven project from eclipse it runs ok. But when i run it from cmd line as a jar file i have the following error:

A JNI error has occurred, please check your installation and try again  
Exception in thread "main" java.lang.NoClassDefFoundError: edu/mit/jwi/IDictionary  
    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: edu.mit.jwi.IDictionary
    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    

But i don't use the
IDictionary.class in my project, instead i use the Dictionary.class of jwi library, so i don't understand why i have the above error and what exactly is that.

Please help!!!!

joan
  • 21
  • 7
  • The class you used, `Dictionary`, implements the interface `IDictionary`. You'll need to have both those in your classpath when your run from the command line. – Andy Thomas Jan 22 '16 at 19:33
  • 1
    "when i run it from cmd line as a jar file i have the following error:" Did you create a fat (executable) JAR? – Tunaki Jan 22 '16 at 19:35

0 Answers0