在Intellij IDEA 2019中,我错误地将错误的行添加到VM选项文件(菜单|说明|编辑自定义VM选项)。之后,IDEA不启动。重新安装也没有帮助。当我从终端运行IDEA时,它给出以下错误:
~/.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
但同时,这些行不在idea64.vmoptions文件中:
~/.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
我不明白是什么错误。有人能帮助吗?感谢您的评论/回答!
1条答案
按热度按时间roqulrg31#
删除/编辑custom .vmoptions file。
通常它位于IDE配置目录中。
在Linux上查找
~/.config/JetBrains/IntelliJIdea2020.2/idea64.vmoptions
(适用于2020.2旗舰版)~/.IntelliJIdea2019.3/config/idea64.vmoptions
(2019.3旗舰版)~/.IdeaIC2019.3/config/idea64.vmoptions
(2019.3社区)Toolbox Managed安装可能会使用不同的位置:
~/.local/share/JetBrains/Toolbox/apps/IDEA-C/ch-0/193.7288.26.vmoptions