idea从2019升级到2025启动失败
前提:一直以来用的idea版本是2019年版,这么多年也不想升级,最近有一个项目因为构建问题发现2019年版本自动加载不了某些资源;于是才升级了版本2025.1.3,结果安装后启动报错:[warning][cds] Archived non-system classes are disabledbecause the java.system.class.loader property is specified (value =com.intellij.util.lang.PathClassLoader").To use archived non-systemclasses, this property must not be setException in thread “main” FATAL ERROR in native method:processing of -javaagent failed, processJavaStart failed
Please try to reinstall the lDEFor support, please refer to https://jb.gg/ide/critical-startup-errors
网上搜索该问题,也问了AI,很多解决办法,一直在提到idea64.exe.vmoptions文件内容里需要删除注释-javaagent或-Djava配置,且提到路径是idea的安装目录bin下,但其实2025版本的这个路径下的idea64.exe.vmoptions文件里并没有-javaagent或-Djava配置;
在茫茫网海搜索下,看到一篇文章:如何解决Idea启动报错InvalidPathException
里面提到一个路径(C:\Users\用户名\AppData\Roaming\JetBrains\IdeaIC2023.2\idea.properties),顺着这个路径去看了一眼,(C:\Users\用户名\AppData\Roaming\JetBrains\IntelliJIdea2025.1)下没有idea.properties,但是有idea64.exe.vmoptions文件,且这个文件里有-javaagent或-Djava配置:
修改后:
启动OK!
本人木兰,以上随手记的,有误的地方请多多指点