Idea抱怨Yosemite上过时的Java版本,但安装了Java 1.8

时间:2015-07-11 17:51:57

标签: java intellij-idea java-8

我有一个新的Yosemite安装的mac。从命令提示符我可以验证我已安装1.8:

╭─user@fox  ~  
╰─$ java -version
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
╭─user@fox  ~  
╰─$ javac -version
javac 1.8.0_25
╭─user@fox  ~  
╰─$ where javac
/usr/bin/javac
╭─user@fox  ~  
╰─$ ls -al /usr/bin/javac
lrwxr-xr-x  1 root  wheel  75 Jun 18 17:26 /usr/bin/javac -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/javac
╭─user@fox  /usr/libexec
╰─$ /usr/libexec/java_home -V
Matching Java Virtual Machines (4):
    1.8.0_25, x86_64:   "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home
    1.7.0_07, x86_64:   "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home
    1.6.0_35-b10-428, x86_64:   "Java SE 6" /Library/Java/JavaVirtualMachines/1.6.0_35-b10-428.jdk/Contents/Home
    1.6.0_35-b10-428, i386: "Java SE 6" /Library/Java/JavaVirtualMachines/1.6.0_35-b10-428.jdk/Contents/Home

/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home

当我尝试启动IntelliJ IDEA 14时出现此错误

enter image description here

点击更新即可转到此页面:https://support.apple.com/kb/DL1572?viewlocale=en_US&locale=en_US。我需要从该页面安装一些东西吗?如果是这样,为什么?我已经有了java

1 个答案:

答案 0 :(得分:3)

转到IntelliJIDEA/Contents/Info.plist并将JVMVersion更改为1.8*