記錄一次idea 2021.3啟動不了


訂閱專欄
目前在用的是2020.1,想升級一下最新的2021.2。官網上下載的最新的,安裝。安裝完成后,首次啟動,發現自動的在下載2020.1在用的插件。恩,很智能嘛。插件下載完后,沒動靜了。雙擊圖面圖標,依然沒有動靜,+++,真不能誇。這下子完了,啟不來了。。。

問題描述:2021.2啟動不了,雙擊桌面圖標,沒有響應;CMD里輸入idea有報錯。

進入到安裝目錄C:\JetBrains\IntelliJ IDEA 2021.2\bin(我自己選的,默認不在這里),打開CMD。輸入idea,發現有報錯。

OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
 
 
 ====================================================
 =======        Jetbrains License Crack       =======
 =======           https://zhile.io           =======
 ====================================================
 
 @See: https://zhile.io/2018/08/17/jetbrains-license-server-crack.html
 
 @Version: 3.2.0, @Build Date: 2020-04-10
 
 
Exception in thread "main" java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:513)
        at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:525)
Caused by: java.lang.RuntimeException: java.lang.NullPointerException
        at fuck_the_regulations_v320.en.b(en.java)
        at fuck_the_regulations_v320.dH.premain(dH.java)
        ... 6 more
Caused by: java.lang.NullPointerException
        ... 8 more
*** java.lang.instrument ASSERTION FAILED ***: "result" with message agent load/premain call failed at ./src/java.instrument/share/native/libinstrument/JPLISAgent.c line: 422
FATAL ERROR in native method: processing of -javaagent failed, processJavaStart failed

錯誤信息一大堆,關鍵的一句

FATAL ERROR in native method: processing of -javaagent failed, processJavaStart failed

問題1:這個參數不是我添加進去的,哪來的???

打開idea.bat,在代碼最后處,加上輸出

#這里是我加入的
echo %CLASS_PATH%
echo %ACC%
echo %IDE_PROPERTIES_PROPERTY%
 
#下面的這些是原始的
"%JAVA_EXE%" ^
  -cp "%CLASS_PATH%" ^
  %ACC% ^
  "-XX:ErrorFile=%USERPROFILE%\java_error_in_idea_%%p.log" ^
  "-XX:HeapDumpPath=%USERPROFILE%\java_error_in_idea.hprof" ^
  -Djava.system.class.loader=com.intellij.util.lang.PathClassLoader -Didea.vendor.name=JetBrains -Didea.paths.selector=IntelliJIdea2021.2 -Didea.jre.check=true ^
  %IDE_PROPERTIES_PROPERTY% ^
  com.intellij.idea.Main ^
  %*

重新執行idea.bat(在CMD里哦),發現如下輸出

-Djb.vmOptionsFile="C:\Users\cpp\AppData\Roaming\JetBrains\IntelliJIdea2021.2\idea64.exe.vmoptions" "-Xms128m" "-Xmx1012m" "-XX:ReservedCodeCacheSize=240m" "-XX:+UseConcMarkSweepGC" "-XX:SoftRefLRUPolicyMSPerMB=50" "-ea" "-XX:CICompilerCount=2" "-Dsun.io.useCanonPrefixCache=false" "-Djdk.http.auth.tunneling.disabledSchemes=""" "-XX:+HeapDumpOnOutOfMemoryError" "-XX:-OmitStackTraceInFastThrow" "-Djdk.attach.allowAttachSelf=true" "-Dkotlinx.coroutines.debug=off" "-Djdk.module.illegalAccess.silent=true" "-javaagent:C:\Users\Public\.jetbrains\jetbrains-agent-v3.2.0.de72.619"
OpenJDK 64-B

看到 -javaagent 這個參數了嗎。近一步發現這個 -javaagent 是在%ACC%變量里。

下一步,查找 %ACC%,發現在idea.bat里,並沒有直接對其設置值,猜想一定是調用了另外的bat文件,對其設置值的,按照這個思路,append.bat,進入了視線。在約在idea.bat里,114行,加上輸出

  echo aaaaaaa\%VM_OPTIONS_FILE%
 
  FOR /F "eol=# usebackq delims=" %%i IN ("%VM_OPTIONS_FILE%") DO CALL "%IDE_BIN_DIR%\append.bat" "%%i"
  IF NOT "%USER_VM_OPTIONS_FILE%" == "" (
    FOR /F "eol=# usebackq delims=" %%i IN ("%USER_VM_OPTIONS_FILE%") DO CALL "%IDE_BIN_DIR%\append.bat" "%%i"
  )
)

發現有使用到 

C:\Users\cpp\AppData\Roaming\JetBrains\IntelliJIdea2021.2\idea64.exe.vmoptions 這個文件,記事本直接輸入該文件,還真有這個文件。內容如下所示:

-Xms128m
-Xmx1012m
-XX:ReservedCodeCacheSize=240m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-XX:CICompilerCount=2
-Dsun.io.useCanonPrefixCache=false
-Djdk.http.auth.tunneling.disabledSchemes=""
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-Djdk.attach.allowAttachSelf=true
-Dkotlinx.coroutines.debug=off
-Djdk.module.illegalAccess.silent=true
-javaagent:C:\Users\Public\.jetbrains\jetbrains-agent-v3.2.0.de72.619

好了,看到 -javaagent:C:\Users\Public\.jetbrains\jetbrains-agent-v3.2.0.de72.619 這一行,是不是定義到問題了,趕緊刪除這一行,再次輸入 idea,久違的啟動畫面出現了。

最后,終結一下,不是ieda做的不好。而是目前在用的2020.1,破解了(為什么破解你的懂的)。然后安裝新版后,由於IEDA太智能了,智能的太過頭了,把現有的啟運參數也都復制過去了。又因為最新的IEDA,不兼容破解程序 C:\Users\Public\.jetbrains\jetbrains-agent-v3.2.0.de72.619了,所以報錯了,所以JVM結束了,所有沒有啟動畫面了,所以就涼涼了。

另外,有嘗試過,報錯不是提向了 :C:\Users\Public\.jetbrains\jetbrains-agent-v3.2.0.de72.619這個文件嗎,那么我刪除這個文件會怎樣呢?事實證明,如下所示:

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 : C:\Users\Public\.jetbrains\jetbrains-agent-v3.2.0.de72.619
Error occurred during initialization of VM
agent library failed to init: instrument

DEBUG流程:idea.bat -> append.bat --> C:\Users\cpp\AppData\Roaming\JetBrains\IntelliJIdea2021.2\idea64.exe.vmoptions

 

最后,寫上遇到的錯誤

OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.


 ====================================================
 =======        Jetbrains License Crack       =======
 =======           https://zhile.io           =======
 ====================================================

 @See: https://zhile.io/2018/08/17/jetbrains-license-server-crack.html

 @Version: 3.2.0, @Build Date: 2020-04-10


Exception in thread "main" java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:513)
        at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:525)
Caused by: java.lang.RuntimeException: java.lang.NullPointerException
        at fuck_the_regulations_v320.en.b(en.java)
        at fuck_the_regulations_v320.dH.premain(dH.java)
        ... 6 more
Caused by: java.lang.NullPointerException
        ... 8 more
*** java.lang.instrument ASSERTION FAILED ***: "result" with message agent load/premain call failed at ./src/java.instrument/share/native/libinstrument/JPLISAgent.c line: 422
FATAL ERROR in native method: processing of -javaagent failed, processJavaStart failed
————————————————
版權聲明:本文為CSDN博主「傷腦腦」的原創文章,遵循CC 4.0 BY-SA版權協議,轉載請附上原文出處鏈接及本聲明。
原文鏈接:https://blog.csdn.net/hnzmdpan/article/details/119845850

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM