Issue
I wrote a working program with java using the teamspeak3API. I haven't changed the code or the jar, so it is exactly the same jar as before. I stopped the program and restarted it, and it caused this error:
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: com/github/theholywaf
fle/teamspeak3/api/wrapper/Client
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: com.github.theholywaffle.teamspeak3
.api.wrapper.Client
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
I use Oracle JRE v8 update 151 on Windows Server 2008. I also tried restarting the root, reinstalling java and re-import the library into the jar through eclipse.
Solution
It seems you cannot found one of your class, check your classpath.
Answered By - TheCodeKiller
Answer Checked By - Cary Denson (JavaFixing Admin)