Idea运行java应用程序时,控制台打印如下信息:
objc[2363]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/bin/java (0x1015924c0) and /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x10160c4e0). One of the two will be used. Which one is undefined.
上述现象是Mac JDK已知的问题,由idea启动应用时使用到的Java Agent触发.这个问题本身是无害的,不影响应用的正常启动与运行.
该问题已在Java9 和 Java8 update 152中修复.
如何隐藏该信息
设置禁用 idea_rt.
-
打开Idea --> Help --> Edit Custom Properties…
增加配置:
idea.no.launcher=true
- 重启Idea后生效
Tips: 不建议禁用IntelliJ IDEA的启动代理.会影响其他的功能比如退出等功能.