ThrowableException
ThrowableException

Reputation: 1426

IntelliJ Cannot resolve symbol 'String' when using IBM JDK

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

Upvotes: 1

Views: 810

Answers (1)

CrazyCoder
CrazyCoder

Reputation: 401995

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.

Upvotes: 1

Related Questions