Prologue
This problem is driving me crazy! I have Googled it and searched it on Stack Overflow ad nauseam. I have tried all the solutions in this thread and none of them have worked. This problem only started happening recently; it never happened in the past. I have imported this code base dozens of times in the past.
Problem
I have a multi-module Maven project with around 100 modules. I import it into Spring Tool Suite as an existing Maven project. But when I go to Maven->Update project on the parent module, I get this error on each of the 100 sub-modules: Cannot find the class file for java.lang.Object
.
Attempted solution #1
I tried reinstalling my JRE in Spring Tool Suite (per this related thread), but that didn't work. I went to Preferences->Java->Installed JREs
, and added the following path as my JRE:
/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home
It recognizes this path as a JRE location and all the JARs pop up, so it seems like it should be correct. But the problem still persists.
Attempted solution #2
I tried deleting the .metadata folders in each of my Spring Tool Suite workspaces. I wanted to reset the configuration. Still, this didn't work.
Question
How can I get rid of this annoying error!? Cannot find the class file for java.lang.Object
? Is there a global Spring Tool Suite configuration file sitting somewhere on my computer that needs to be deleted so the default configuration can be restored? Can you think of any way to solve this problem and get rid of the error?
Help would be much appreciated.