Fork me on GitHub

Mac OS X “to open Eclipse, you need a Java SE 6 runtime”

在Mac OS X上,只安装了Java 7而没有安装Java 6时,打开Eclipse等依赖Java的软件,可能会遇到:
To open “Eclipse,” you need a Java SE 6 runtime. Would you like to install one now?
这样的错误提示,经过查找和实验,这里给两个解决方案吧。

1.修改Java安装目录的Info.plist文件:
如,我的系统上是修改:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Info.plist 文件,将这部分

<key>JVMCapabilities</key>
<array>
   <string>CommandLine</string>
</array>    

改为如下:(主要是添加了4行东东)

<key>JVMCapabilities</key>
<array>
       <string>JNI</string>
       <string>BundledApp</string>
       <string>WebStart</string>
       <string>Applets</string>
       <string>CommandLine</string>
</array>

修改后,重启系统,再打开Eclipse这样的软件就会正常启动了。


2.按照提示那样,安装JDK 6吧:
到Apple的官方如下页面下载JDK安装:

http://support.apple.com/kb/DL1572?viewlocale=en_US

安装后,默认就有java 6了,启动Eclipse也不会出问题了。

参考资料:

Ref:http://stackoverflow.com/questions/19563766/eclipse-kepler-for-os-x-mavericks-request-java-se-6

Ref:http://www.macobserver.com/tmo/article/uninstall-or-disable-java-on-a-mac

 

3.直接使用IntelliJ IDEA,这个完全可以代替Eclipse

The Most Intelligent Java IDE

Excel at enterprise, mobile and web development with Java, Scala and Groovy, with all the latest modern technologies and frameworks available out of the box.

Ref:http://www.jetbrains.com/idea/

Ref:Jetbrains Product Patch Or Keygen

Ref:http://idea.lanyus.com(crack)

posted @ 2015-04-14 11:02  Nick.Chung  阅读(343)  评论(0编辑  收藏  举报