Skip to content
Advertisement

The Intellij IDEA does not launch after editing the VM options file

In Intellij IDEA 2019 I mistakenly added incorrect lines to the VM option file (Menu | Help | Edit Custom VM Options). After that, the IDEA does not launch. Reinstallation didn’t help. When I run IDEA from terminal, it gives the following error:

~/.local/share/JetBrains/Toolbox/apps/IDEA-C/ch-0/193.7288.26/bin$ ./idea.sh

OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated 
in version 9.0 and will likely be removed in a future release.
Error: Could not find or load main class org.gradle.jvmargs=-Xmx2048M,
-XX:MaxMetaspaceSize=512m Caused by: java.lang.ClassNotFoundException: 
org.gradle.jvmargs=-Xmx2048M, -XX:MaxMetaspaceSize=512m

But at the same time, these lines are not in the idea64.vmoptions file:

~/.local/share/JetBrains/Toolbox/apps/IDEA-C/ch-0/193.7288.26/bin$ cat idea64.vmoptions

-Xms128m
-Xmx750m
-XX:ReservedCodeCacheSize=240m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-XX:CICompilerCount=2
-Dsun.io.useCanonPrefixCache=false
-Djava.net.preferIPv4Stack=true
-Djdk.http.auth.tunneling.disabledSchemes=""
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-Djdk.attach.allowAttachSelf=true
-Dkotlinx.coroutines.debug=off
-Djdk.module.illegalAccess.silent=true
-Dawt.useSystemAAFontSettings=lcd
-Dsun.java2d.renderer=sun.java2d.marlin.MarlinRenderingEngine
-Dsun.tools.attach.tmp.only=true

I don’t understand what the error is. Can anyone help? Thanks for any comment/answer!

Advertisement

Answer

Delete/edit the custom .vmoptions file.

Usually it’s located in the IDE configuration directory.

On Linux look for

~/.config/JetBrains/IntelliJIdea2020.2/idea64.vmoptions (for 2020.2 Ultimate) ~/.IntelliJIdea2019.3/config/idea64.vmoptions (2019.3 Ultimate) ~/.IdeaIC2019.3/config/idea64.vmoptions (2019.3 Community)

Toolbox managed installations may use different location:

~/.local/share/JetBrains/Toolbox/apps/IDEA-C/ch-0/193.7288.26.vmoptions

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement