【MAC-IDEA报错解决】

用户在Mac上重新安装IntelliJIDEA后遇到启动问题,错误日志显示与JVMbundle相关,特别是libjli.dylib文件的架构不匹配。删除jetbrains-agent.jar配置后,问题得到解决,IDEA正常启动。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

MAC IDEA启动显示 “idea”意外退出

在这里插入图片描述
背景:重新安装idea之后 从官网下载完安装 启动之后都是这样

解决:

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

Last login: Mon Apr 17 11:43:08 on ttys000
lipengzhen@localhost ~ % /Applications/IntelliJ\ IDEA.app/Contents/MacOS/idea ; exit;
2023-04-17 13:30:30.930 idea[1953:56629] allVms required 1.8*,1.8+
2023-04-17 13:30:30.931 idea[1953:56633] Cannot load JVM bundle: Error Domain=NSCocoaErrorDomain Code=3585 "dlopen_preflight(/Applications/IntelliJ IDEA.app/Contents/jbr/Contents/MacOS/libjli.dylib): no suitable image found.  Did find:
	/Applications/IntelliJ IDEA.app/Contents/jbr/Contents/MacOS/libjli.dylib: mach-o, but wrong architecture
	/Applications/IntelliJ IDEA.app/Contents/jbr/Contents/MacOS/libjli.dylib: mach-o, but wrong architecture" UserInfo={NSLocalizedFailureReason=The bundle doesn’t contain a version for the current architecture., NSLocalizedRecoverySuggestion=Try installing a universal version of the bundle., NSFilePath=/Applications/IntelliJ IDEA.app/Contents/jbr/Contents/MacOS/libjli.dylib, NSDebugDescription=dlopen_preflight(/Applications/IntelliJ IDEA.app/Contents/jbr/Contents/MacOS/libjli.dylib): no suitable image found.  Did find:
	/Applications/IntelliJ IDEA.app/Contents/jbr/Contents/MacOS/libjli.dylib: mach-o, but wrong architecture
	/Applications/IntelliJ IDEA.app/Contents/jbr/Contents/MacOS/libjli.dylib: mach-o, but wrong architecture, NSBundlePath=/Applications/IntelliJ IDEA.app/Contents/jbr, NSLocalizedDescription=The bundle “JBR-17.0.6+1-653.34-jcef 17.0.6” couldn’t be loaded because it doesn’t contain a version for the current architecture.}
rosetta_has_been_previously_installed: true
2023-04-17 13:30:30.936 idea[1953:56633] Retrying as x86_64...
2023-04-17 13:30:30.965 idea[1953:56636] allVms required 1.8*,1.8+
2023-04-17 13:30:30.969 idea[1953:56650] Current Directory: /Users/lipengzhen
2023-04-17 13:30:30.969 idea[1953:56650] parseVMOptions: IDEA_VM_OPTIONS = (null)
2023-04-17 13:30:30.969 idea[1953:56650] fullFileName is: /Applications/IntelliJ IDEA.app/Contents/bin/idea.vmoptions
2023-04-17 13:30:30.969 idea[1953:56650] fullFileName exists: /Applications/IntelliJ IDEA.app/Contents/bin/idea.vmoptions
2023-04-17 13:30:30.969 idea[1953:56650] parseVMOptions: /Applications/IntelliJ IDEA.app/Contents/bin/idea.vmoptions
2023-04-17 13:30:30.969 idea[1953:56650] parseVMOptions: /Applications/IntelliJ IDEA.app.vmoptions
2023-04-17 13:30:30.970 idea[1953:56650] parseVMOptions: /Users/lipengzhen/Library/Application Support/JetBrains/IntelliJIdea2022.3/idea.vmoptions
2023-04-17 13:30:30.971 idea[1953:56650] parseVMOptions: platform=20 user=5 file=/Users/lipengzhen/Library/Application Support/JetBrains/IntelliJIdea2022.3/idea.vmoptions
CompileCommand: exclude com/intellij/openapi/vfs/impl/FilePartNodeRoot.trieDescend bool exclude = true
Exception in thread "main" java.lang.ExceptionInInitializerError
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:491)
	at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:503)
Caused by: java.util.ConcurrentModificationException: java.lang.ClassNotFoundException: com.licel.b.Z@
	at fuck_the_regulations_v313.cH.<clinit>(cH.java)
	... 6 more
Caused by: java.lang.ClassNotFoundException: com.licel.b.Z@
	at com.intellij.util.lang.UrlClassLoader.findClass(UrlClassLoader.java:220)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:587)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:375)
	... 7 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
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGABRT (0x6) at pc=0x00007fff2032792e, pid=1953, tid=8963
#
# JRE version: OpenJDK Runtime Environment JBR-17.0.6+1-653.34-jcef (17.0.6+1) (build 17.0.6+1-b653.34)
# Java VM: OpenJDK 64-Bit Server VM JBR-17.0.6+1-653.34-jcef (17.0.6+1-b653.34, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, bsd-amd64)
# Problematic frame:
# C  [libsystem_kernel.dylib+0x792e]  __pthread_kill+0xa
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /Users/lipengzhen/java_error_in_idea_1953.log
#
# If you would like to submit a bug report, please visit:
#   https://youtrack.jetbrains.com/issues/JBR
#
zsh: abort      /Applications/IntelliJ\ IDEA.app/Contents/MacOS/idea
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[进程已完成]


这是我的运行报错 ,找到其中相关配置文件的信息
在这里插入图片描述

然后command+shift+G 进入文件目录 打开相应的配置文件看看有什么问题

我的打开之后配置文件中有一个 jetbrains-agent.jar 的配置 我给删除之后保存再启动,idea正常启动了。

### 解决 IntelliJ IDEA 中 'Archived non-system classes are disabled' 报错 当遇到 `Archived non-system classes are disabled` 的警告以及后续的 `LinkageError` 错误时,这通常意味着某些配置项阻止了 IDE 使用存档类加载机制。具体来说,在 JVM 启动参数中设置了 `java.system.class.loader` 属性会触发此行为。 对于这个问题,可以尝试以下方法来解决问题: #### 方法一:调整 VM Options 文件设置 编辑 IntelliJ IDEA 安装目录下的 `.vmoptions` 文件(通常是位于用户目录中的 `<IDEA_HOME>/bin/idea64.exe.vmoptions` 或者 Linux/Mac 下对应的文件),移除或注释掉涉及 `jetbrains-agent.jar` 的行[^3]: ```bash # 移除或注释该行 #-javaagent:/path/to/jetbrains-agent.jar=disable-archived-non-system-classes=true ``` #### 方法二:修改启动脚本环境变量 如果是在命令行通过 shell 脚本来启动 PyCharm,则可以在启动脚本前临时取消指定自定义类加载器的影响。例如在 Bash Shell 中执行如下操作后再运行程序: ```bash unset JAVA_TOOL_OPTIONS sudo ./pycharm.sh ``` 这样做能够防止外部传递给 Java 进程的工具选项干扰到内部的工作流程[^1]。 #### 方法三:更改 JDK 本 由于提到使用的是 JDK 17 可能存在兼容性问题,建议切换至更稳定支持的 JDK 本进行测试,比如采用 LTS 长期支持如 JDK 8u 或者 JDK 11 来查看是否仍然会出现相同的问题。 以上措施应该可以帮助缓解并最终解决所描述的情况。需要注意的是每次改动后都应重启应用程序使新的配置生效。
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值