I'm trying to set up a new project in Intelij. It's a multimodule project, with a maven parent module, and the application server is WebSpere 9.0.5.0. The problem I encounter is when I ty to run it, I get the error java: cannot access java.lang.Object class file for java.lang.Object not found and then java: cannot find symbol symbol: class String for every single String in the code. If I click on a String to see the problem and see the fix of Intelij, it add the import org.apache.xpath.operations.String;
-
Please see if stackoverflow.com/a/4618860/12844632 helps.Egor Klepikov– Egor Klepikov2021-08-09 13:26:27 +00:00Commented Aug 9, 2021 at 13:26
-
thank's but none of the answers helpedLisa Hennecart– Lisa Hennecart2021-08-09 13:31:44 +00:00Commented Aug 9, 2021 at 13:31
2 Answers
I'd the same problem, but with Android Studio, similar anyway, try this:
In toolbar: File -> Invalidate Caches / Restart... -> Invalidate and restart
1 Comment
I had the same problem, and in my case, invalidate caches didn't work. A colleague of mine pointed out: make sure in the definition of your SDK, the vm.jar file is included (File > Project Structure > Platform Settings > SDKs).
I added this file to the classpath and the red signs disappeared:
$PATH_TO_SDK/jre/bin/default/jclSC180/vm.jar
If this path does not exist for your SDK, find it!
find $PATH_TO_SDK -name vm.jar