今天我在 macOS Sierra 上升级了我的 Intellij Idea,现在,当我在控制台中运行应用程序时出现此错误:
objc[3648]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/bin/java (0x10d19c4c0) and /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x10ea194e0). One of the two will be used. Which one is undefined.
最佳答案
您可以在此处找到所有详细信息:
- IDEA-170117 “objc:JavaLaunchHelper 类在两者中都实现了……”运行控制台中的警告
这是old bug in Java在 Mac 上 got triggered by the Java Agent在启动应用程序时由 IDE 使用。此消息无害,可以安全忽略。 Oracle 开发人员评论:
The message is benign, there is no negative impact from this problem since both copies of that class are identical (compiled from the exact same source). It is purely a cosmetic issue.
problem is fixed在 Java 9在Java 8 update 152 .
如果它以任何方式惹恼您或影响您的应用程序(不应该),IntelliJ IDEA 的解决方法是通过添加 idea.no.launcher= 来禁用
到 idea_rt
启动器代理trueidea.properties
(帮助
| 编辑自定义属性...
)。解决方法将在下次重新启动 IDE 时生效。
不过,我不建议禁用 IntelliJ IDEA 启动器代理。它用于诸如正常关闭(退出按钮)、线程转储、命令行过长超出操作系统限制等问题的解决方法。仅仅为了隐藏无害消息而失去这些功能可能不值得,但它是由你决定。
关于java - 类 JavaLaunchHelper 在两个地方实现,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43040807/