[英]Eclipse 4.4 (64bit mac) needs JVM v1.7+
I have updated Java to version 7. When I open the Java control panel it says i have v 1.7.0_60 but when I run java -version from terminal it says i have JVM v 1.6.0_65. 我已经将Java更新到版本7。打开Java控制面板时,它说我有1.7.0_60,但是从终端运行Java -version时,它说我有JVM 1.6.0_65。 I'm not sure where to go from here, I'm a beginner here. 我不确定从这里要去哪里,我是这里的初学者。 I looked for the eclipse.ini file as referenced in this post , but I only saw config.ini no eclipse.ini. 我看了eclipse.ini文件在此引用的帖子 ,但我只看到config.ini文件没有的eclipse.ini。 I also double checked that i had the 64bit version as referenced in this post . 我也双重检查,我有64位版本,在此引用的帖子 。
The version of java hit by java -version
is going to be the version that is configured in your PATH
system environment variable, which is not related to what you see in the Java control panel. 由java -version
命中的java -version
版本将是在PATH
系统环境变量中配置的版本,该变量与您在Java控制面板中看到的无关。 Alter it to point at your new JVM installation and restart your terminal and you should see it take effect. 将其更改为指向新的JVM安装并重新启动终端,您应该会看到它生效。
Try adding the following to the .bash_profile file in your home directory: 尝试将以下内容添加到主目录中的.bash_profile文件中:
export JAVA_HOME=
/usr/libexec/java_home -v 1.7
导出JAVA_HOME =/usr/libexec/java_home -v 1.7
(Then open a new terminal window, or type "source ~/.bash_profile" for the change to take effect). (然后打开一个新的终端窗口,或键入“ source〜/ .bash_profile”以使更改生效)。
You should be able to switch between versions by changing the version number (if necessary). 您应该能够通过更改版本号在版本之间进行切换(如有必要)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.