简体   繁体   English

尽管我有 jar 文件,但在 java 中找不到类异常

[英]Class not found exception in java though I have the jar file

I had a properly working eclipse project until this afternoon, when I closed my eclipse workspace (nothing special happened, but it closed a little bit slower than usually).我有一个正常工作的 eclipse 项目,直到今天下午我关闭了我的 eclipse 工作区(没有发生什么特别的事情,但它关闭的速度比平时慢了一点)。 When I restarted my eclipse a few hours later, I got a class not found exception.几个小时后,当我重新启动我的日食时,我遇到了一个未找到类的异常。

I think that somehow (I am not sure how, because I did not use my computer in the mean time), I broke the class path.我认为不知何故(我不确定如何,因为我当时没有使用我的电脑),我打破了课程路径。 I tried to import the missing jar file again, but it did not work because我试图再次导入丢失的 jar 文件,但它不起作用,因为

  1. I already have it under the plugin dependencies我已经在插件依赖项下有了它
  2. There are at least 20 imported jar files, and as I realized I can not delete just one, I have to remove the whole plug-in dependencies library, I and hope I do not have to import all of the other jar files again.至少有 20 个导入的 jar 文件,当我意识到我不能只删除一个时,我必须删除整个插件依赖库,我希望我不必再次导入所有其他 jar 文件。

Do you have any advice what can I try?你有什么建议我可以尝试吗? I tried to look for similar cases, but most of them are usually a new project, which did not work before, and I just can not find the proper words for minimize the number of found solutions.我试图寻找类似的案例,但其中大多数通常是一个新项目,以前不起作用,我只是找不到合适的词来最小化找到的解决方案的数量。

Thank you!谢谢!

For each of my imported jar file, there were a number of access rules defined.对于我导入的每个 jar 文件,都定义了许多访问规则。 I removed the one, which name was forbidden */**, and now it works again.我删除了那个名字被禁止的 */**,现在它又可以工作了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM