本文介绍了NoClassDefFound 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
java.lang.NoClassDefFoundError: javax/mail/Authenticator
我已将激活器和邮件 jar 添加到我的 server/deps 目录中,但仍然遇到此问题,我不知道为什么.
I have added the activator and mail jars to my server/deps directory, and am still encountering this problem and I don't know why.
推荐答案
请记住 NoClassDefFoundError
与 ClassNotFoundException
不同.NoClassDefFoundError
意味着在编译时在类路径中可用的类在运行时不可用.您确定您的 jar 文件在 runtime 类路径中吗?
Keep in mind NoClassDefFoundError
isn't the same as ClassNotFoundException
. NoClassDefFoundError
means that a class that was available in the classpath at compile time isn't available at runtime. Are you sure your jar files are in the runtime classpath?
这篇关于NoClassDefFound 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!