这里写自定义目录标题
IDEA 桌面双击无反应
问题描述:idea 2021.02.02 版本更新后出现 双击idea 无法打开软件 页面无任何反应,CMD里输入idea有 报错(找到idea 安装目录bin 双击 文件 idea.bat 出现报错信息 )
报错信息:
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
问题查找
打开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"
)
)
双击 文件 得到文件信息
aaaaaaa\C:\Users\app\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.
路径 :C:\Users\app\AppData\Roaming\JetBrains\IntelliJIdea2021.2\idea64.exe.vmoptions
就是 idea 使用的文件
找到该文件 :
-Xms128m
-Xmx2041m
-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
-Dkotlinx.coroutines.debug=off
-Djdk.module.illegalAccess.silent=true
#-javaagent:C:\Users\��\.jetbrains\jetbrains-agent-v3.0.0.jar
最后一行 #号注释 或者删除
原文链接: [https://blog.csdn.net/hnzmdpan/article/details/119845850]