IntelliJ IDEA doesn't start on Ubuntu after Change the boot Java runtime

Viewed 1250

Before, my IntelliJ run well. But I used java 6 , so my project can not run with gradle. I switch java to version 8 by command sudo update-alternatives --config java . I checked version java -version was 1.8.0_312. It 's OK, but in IntelliJ, the Java have version 6. Then, I change version java in IntelliJ by solution :

From the main menu, select Help | Find Action or press Ctrl+Shift+A.

Find and select the Choose Boot Java Runtime for the IDE action.

Select the desired runtime and click OK. And Restart IntelliJ. Final, my IntelliJ can not open again. I try remove and install again or remove java and install again but it does not work. I run ./idea.sh it have error:

OpenJDK 64-Bit Server VM warning: Archived non-system classes are disabled because the java.system.class.loader property is specified (value = "com.intellij.util.lang.PathClassLoader"). To use archived non-system classes, this property must not be set
Error: LinkageError occurred while loading main class com.intellij.idea.Main
    java.lang.ExceptionInInitializerError: null

Please help me , thank you very much

1 Answers

I've had the same issue working on windows.

When you check IntelliJ's log (idea.log file) you can find a entry for the change you've made with its 'reset' option.

For me it was:

2022-08-08 09:47:47,906 [ 594730] WARN - Downloader.RuntimeChooserPaths - Set custom boot runtime to: C:\Data\Java\jdk-17.0.3.1 in the C:\Users\username\AppData\Roaming\JetBrains\IntelliJIdea2021.3\idea64.exe.jdk. On errors, please remove the .jdk file

You find the log files are stored at:

Linux: ~/.cache/JetBrains/IntelliJIdea2020.3/log

Windows: %LOCALAPPDATA%\JetBrains\IntelliJIdea2020.3\log

macOS: ~/Library/Logs/JetBrains/IntelliJIdea2020.3

Related