天天看點

Mac IntelliJ IDEA 2020.1 閃退

問題:重新安裝了IntellJ IDEA 2020.1,點選圖示打不開。

解決步驟:

1、訪達,應用程式中IDEA圖示右鍵,顯示包内容。

2、進入Contents->MacOS, 打開idea,檢視指令行報錯 。

Last login: Tue Sep 15 10:47:33 on ttys001

The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.
huabingdeMacBook-Pro:~ huabing$ /Applications/IntelliJ\ IDEA.app/Contents/MacOS/idea ; exit;
2020-09-15 10:47:44.638 idea[2742:32134] allVms required 1.8*,1.8+
2020-09-15 10:47:44.640 idea[2742:32140] Current Directory: /Users/huabing
2020-09-15 10:47:44.640 idea[2742:32140] Value of IDEA_VM_OPTIONS is (null)
2020-09-15 10:47:44.641 idea[2742:32140] Processing VMOptions file at /Users/huabing/Library/Application Support/JetBrains/IntelliJIdea2020.1/idea.vmoptions
2020-09-15 10:47:44.641 idea[2742:32140] Done
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Error opening zip file or JAR manifest missing : ../bin/jetbrains-agent.jar
Error occurred during initialization of VM
agent library failed to init: instrument
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
           

3、如上圖所示

錯誤定位:Processing VMOptions file at /Users/xxxx/Library/Application Support/JetBrains/IntelliJIdea2020.1/idea.vmoptions

是因為之前版本破解的時候修改過這個idea.vmoptions檔案,添加了:-javaagent:../bin/jetbrains-agent.jar

-Xms128m
-Xmx1125m
-XX:ReservedCodeCacheSize=240m
-XX:+UseCompressedOops
-Dfile.encoding=UTF-8
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-Djdk.http.auth.tunneling.disabledSchemes=""
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-Xverify:none

-XX:ErrorFile=$USER_HOME/java_error_in_idea_%p.log
-XX:HeapDumpPath=$USER_HOME/java_error_in_idea.hprof
-javaagent:../bin/jetbrains-agent.jar
           

4、去掉idea.vmoptions檔案中:-javaagent:../bin/jetbrains-agent.jar