Home > Enterprise >  Error message when opening IntelliJ, from command line in Linux
Error message when opening IntelliJ, from command line in Linux

Time:03-21

I changed my IntelliJs base JDK, to try and fix an error, and now it will not even let me open up Intellij. I tried to re-install, but that did not work. IntelliJ version - 2020.3.3 JDK of my Linux VM - openjdk 11.0.14 2022-01-18 JDK I changed my IntelliJ too - 17.0.2

!bootstrap.error.message.internal.error.please.refer.to.0!https://jb.gg/ide/critical-startup-errors!

java.lang.IllegalAccessError: class com.intellij.idea.StartupUtil (in unnamed module @0x7c89fbb9) cannot access class sun.awt.AWTAutoShutdown (in module java.desktop) because module java.desktop does not export sun.awt to unnamed module @0x7c89fbb9
    at com.intellij.idea.StartupUtil.start(StartupUtil.java:301)
    at com.intellij.idea.Main.bootstrap(Main.java:134)
    at com.intellij.idea.Main.main(Main.java:82)

CodePudding user response:

From the docs

Boot JDK path is stored in the .jdk file located in the config folder. It can be modified either via the Change IDE boot JDK action or by manually editing .jdk file (if you can't start the IDE to change it via an action).

So you need to manually edit the .jdk file. (As for what that editing looks like, I'm unsure. It's not mentioned in the docs)

For Linux and Mac, JetBrains recommends their own JRE, which is referenced in that doc.

CodePudding user response:

Intellij IDEA 2020.3 does not support the use of JDK 17. That makes sense since it was released in November 2020, and JDK 17 was released about 10 months later, on September 14, 2021.

The most recent JDK you can use with Intellij IDEA 2020.3 is JDK 15.

So either downgrade the JDK used by Intellij IDEA 2020.3 to JDK 15, or upgrade to a version of Intellij IDEA >= 2021.2, allowing you to use JDK 17.

  • Related