Before, my IntelliJ ran well. But I used java 6, so my project could not run with gradle. I switched java to version 8 with the command sudo update-alternatives --config java
. I checked java -version
was 1.8.0_312
. It's OK, but in IntelliJ, the Java still had version 6. Then, I changed java version in IntelliJ with:
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 restarted IntelliJ, which could not be opened again. I tried to remove and install it again as well as removing java and installing it again too, but neither did work. When I run ./idea.sh
, I get the following 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
Now, I'm not even able to " change JRE in intelliJ " as suggested in the comments any more.
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
Converting the comment by the author from May 2 at 4:22 to an answer.
The issue was resolved by changing the JRE path in this file: /.config/JetBrains/IntelliJIdea2022.1/idea.jdk
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.