更多>>Java程序設計 Blog
來源:一度好 時間:2023-11-01 閱讀:115
Error launching IDEA Improperly specified VM option. To fix the problem, edit your JVM options and remove the options that are obsolete or not supported by the current version of the JVM.
1、在修改了 idea 的 vm 文件后,關掉 idea 后,想要再次打開 idea 時,發現無法啟動 idea 了,出現了錯誤彈窗提示。
2、錯誤信息如下:
- - - - - - - - - - -
Error launching IDEA
- - - - - - - - - - -
Improperly specified VM option. To fix the problem, edit your JVM
options and remove the options that are obsolete or not supported by
the current version of the JVM.
Failed to create JVM. JVM Path: D:\Program Files\JetBrains\IntelliJ IDEA
2022.2.1\jbr\
- - - - - - - - - - -
確定
- - - - - - - - - - -
3、錯誤信息彈窗,如圖所示:
4、經過查看 idea.vmoptions 文件后,發現參數修改出錯了,如下:
5、正確的配置代碼如下:
-Xms2000m -Xmx2500m -XX:ReservedCodeCacheSize=1000m -XX:+IgnoreUnrecognizedVMOptions -XX:+UseG1GC -XX:SoftRefLRUPolicyMSPerMB=50 -XX:CICompilerCount=2 -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -ea -Dsun.io.useCanonCaches=false -Djdk.http.auth.tunneling.disabledSchemes="" -Djdk.attach.allowAttachSelf=true -Djdk.module.illegalAccess.silent=true -Dkotlinx.coroutines.debug=off -XX:ErrorFile=$USER_HOME/java_error_in_idea_%p.log -XX:HeapDumpPath=$USER_HOME/java_error_in_idea.hprof --add-opens=java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED --add-opens=java.base/jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED idea.max.intellisense.filesize=40480 idea.max.vcs.loaded.size.kb=40480 -javaagent:D:\java\Soft\idea2022.2.1\JetBrains\jetbra\ja-netfilter.jar=jetbrains
6、原始的配置代碼如下:
-Xms128m -Xmx1024m -XX:ReservedCodeCacheSize=512m -XX:+IgnoreUnrecognizedVMOptions -XX:+UseG1GC -XX:SoftRefLRUPolicyMSPerMB=50 -XX:CICompilerCount=2 -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -ea -Dsun.io.useCanonCaches=false -Djdk.http.auth.tunneling.disabledSchemes="" -Djdk.attach.allowAttachSelf=true -Djdk.module.illegalAccess.silent=true -Dkotlinx.coroutines.debug=off -XX:ErrorFile=$USER_HOME/java_error_in_idea_%p.log -XX:HeapDumpPath=$USER_HOME/java_error_in_idea.hprof --add-opens=java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED --add-opens=java.base/jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED -javaagent:C:\jetbra2\jetbra\ja-netfilter.jar=jetbrains
7、說明:
如果找不到 idea.vmoptions 這個文件,可以通過查找搜索功能進行查找。
如搜索 vmoptions
評論列表 |
暫時沒有相關記錄
|
發表評論