One of the two will be used. Which one is undefined.,usedundefined
分享于 点击 32648 次 点评:172
One of the two will be used. Which one is undefined.,usedundefined
objc[6040]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/bin/java (0x10e0f04c0) and /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x10f1174e0). One of the two will be used. Which one is undefined.
原因:因为机器上新装了一个JDK, 导致之前项目设置的JDK “人格分裂”
右键项目 -> open module settings -> Project
在project jdk上edit,然后选一个最新的jdk即可
但是我只有一个JDK,没有安装其他的,时突然出现这个问题的
首先配置好环境变量
以Mac为例
编辑 .bash_profile 文件, 在最后添加
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home
CLASSPAHT=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
PATH=$JAVA_HOME/bin:$PATH:
export JAVA_HOME
export CLASSPATH
export PATH
最后别忘记让这个配置生效, 在终端执行
source .bash_profile
配置Intellij Idea
1.打开idea.properties文件
help->edit custom properties
2. 在文件中添加一行
idea.no.launcher=true
相关文章
- 暂无相关文章
用户点评