每天来自每个班级的 java.lang.NoClassDefFoundError [英] java.lang.NoClassDefFoundError from every class every day
问题描述
我试过重新安装 netbeans,我试过重新安装 java.我不确定发生了什么,但我从每个班级随机得到这个异常,直到我重新启动 netbeans.有没有遇到类似问题的人?
I have tried reinstalling netbeans, I have tried reinstalling java. I'm not sure what's going on but I get this exception at random from every class until I restart netbeans. Anyone with similar problems?
运行:
Exception in thread "main" java.lang.NoClassDefFoundError: com/company/utilities/formatters/DateFinder
at com.protocase.db.DatabaseAdapter.<init>(DatabaseAdapter.java:44)
at packagingqueries.PackagingQueries.getBatchIDsForOperation(PackagingQueries.java:42)
at packagingqueries.PackagingQueries.main(PackagingQueries.java:20)
Caused by: java.lang.ClassNotFoundException: com.protocase.utilities.formatters.DateFinder
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
推荐答案
有时,NetBeans 本地缓存目录会损坏(因为应用程序较早崩溃或因为其他/未定义的事情发生).NetBeans 开始出现奇怪的行为.重新安装没有帮助,因为本地缓存目录并不总是被删除.
Sometimes, the NetBeans local cache directory becomes corrupted (either because the application crashed earlier or because something else/undefined happened). NetBeans starts to behave strangely. Re-installing does not help, because the local cache directory is not always deleted.
如果您 100% 确定您的应用程序没有路径问题:
If you are 100% sure your application does not have a path problem:
- 关闭 NetBeans
- 如果您使用的是 Windows,请转到 c:Usersyouruserid.netbeans7.0(或者在您的系统上找到相应的目录)
- 彻底删除内容
- 重启 NetBeans
NetBeans 将重新创建此目录的内容.这可能解决您的问题.如果没有,那么您的问题肯定出在应用程序的配置或损坏的库中.
NetBeans will recreate the content of this directory. This may solve your issue. If it does not, then your issue is in the configuration of your application or in a corrupted library for sure.
如果存储这些文件的位置没有足够的写入空间,就会出现这个问题.像往常一样,一个人需要腾出空间......
If the location where these files are stored runs out of space for writing, this problem can arise. As usual, one needs to make space...
这篇关于每天来自每个班级的 java.lang.NoClassDefFoundError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!