您的位置:首页技术文章
文章详情页

macos - idea用maven编译成功,但总有提Class JavaLaunchHelper is implemented in both

【字号: 日期:2024-01-07 13:41:52浏览:37作者:猪猪

问题描述

在mac上idea用maven编译成功,但老是有这个提示:objc[1386]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.

运行 /usr/libexec/java_home -V :macos - idea用maven编译成功,但总有提Class JavaLaunchHelper is implemented in both

运行 java -version:macos - idea用maven编译成功,但总有提Class JavaLaunchHelper is implemented in both

idea版本是最新的2017.1。有知道怎么解决这个问题的同学吗?麻烦告之,谢谢!

问题解答

回答1:

export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Homeexport PATH=$JAVA_HOME/bin:$PATH试试这个

标签: java