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;
Asked
Active
Viewed 2,983 times
4

Lisa Hennecart
- 59
- 1
- 6
-
Please see if https://stackoverflow.com/a/4618860/12844632 helps. – Egor Klepikov Aug 09 '21 at 13:26
-
thank's but none of the answers helped – Lisa Hennecart Aug 09 '21 at 13:31
2 Answers
4
I'd the same problem, but with Android Studio, similar anyway, try this:
In toolbar: File -> Invalidate Caches / Restart... -> Invalidate and restart

Reversed Kovalski
- 91
- 3
-
I changed the path to JDK, faced the same problem and this answer helped me. – Antoine Jan 09 '23 at 08:45
3
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

Gabriel Xunqueira
- 413
- 1
- 4
- 11