Search code examples
javaeclipseclassnotfoundexception

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). 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

  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.

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!


Solution

  • For each of my imported jar file, there were a number of access rules defined. I removed the one, which name was forbidden */**, and now it works again.