1

The similar issue was report in this post without any solution.

--

My IntelliJ Version is IntelliJ IDEA 2022.1.2 (Community Edition)

For over an year, I have been working on a maven project which uses a customized ibm-jdk8 and a customized maven installation.

So I've configured global maven runner & import settings & project & module SDK settings to use this custom JDK. All this setup had been working fine for over an year.

project jdk

module jdk

maven

maven import using custom jdk

maven runner using custom jdk

Yesterday, I updated IDEA to newer version, I'm not sure what was the reason but I started getting wired IDE errors.

So I invalidated the cache and restarted the IDE,

When that did not solve the issues, I manually deleted following folders

  1. All ~/AppData/*/JetBrains folders .
  2. .idea folder inside project root.
  3. project-name.iml file inside project root.

After that I updated all intelliJ setting same as above, but Since then I've been getting Cannot resolve symbol 'String' Strangely all other JDK classes are detected, but in whole code String is not working.

enter image description here

CrazyCoder
  • 389,263
  • 172
  • 990
  • 904
ThrowableException
  • 1,168
  • 1
  • 8
  • 29

1 Answers1

1

It's a known issue specific to IBM JDK.

The workaround is to manually add vm.jar file from JDK_HOME\jre\bin\default\jclSC180\vm.jar to the SDK classpath tab in IntelliJ IDEA.

CrazyCoder
  • 389,263
  • 172
  • 990
  • 904
  • Thanks @CrazyCoder, that solved the issue... But I had been using the same setup for over an year and do not remember explicitly adding vm.jar in the SDK classpath. Is this something related to newer version of IDEA. – ThrowableException Jun 13 '22 at 16:10
  • 1
    IntelliJ IDEA cannot detect non-standard jar files in non-standard locations like in IBM JDK. You either used a different JDK vendor or you added this jar manually. – CrazyCoder Jun 13 '22 at 16:11