如何摆脱这个Java Stacktrace?

时间:2017-10-26 15:12:13

标签: java eclipse stack-trace

我写了一个工作!使用teamspeak3API编写java程序。我没有更改代码或jar,所以它和以前完全一样。我停止了程序并重新启动它,它导致了这个错误:

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

我在Windows Server 2008上使用Oracle JRE v8 update 151。 我也尝试重新启动root,重新安装java并通过eclipse将库重新导入jar。

1 个答案:

答案 0 :(得分:0)

看来你找不到一个班级,检查你的班级路径。