问题现象:
- IDEA运行程序时报错
objc[14835]: Class JavaLaunchHelper is implemented in both
/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home/bin/java
(0x10760e4c0) and
/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home/jre/lib/libinstrument.dylib
(0x1076884e0). One of the two will be used. Which one is undefined.
问题解决:
1、点击IDEA导航栏上的Help,选择Edit Custom Properties;
2、初次使用是没有properties文件的,这时候IDEA会弹出以下界面提示你创建,直接点击Creat即可;
3、点击创建properties文件之后会自动创建并打开idea.properties的一个文件,可以在这个文件里面写入自定义属性设置;
4、写入idea.no.launcher=true,重启IDEA
问题原因:
- JavaLaunchHelper类被实现了两次,Mac下特有的,IDEA的一个老Bug