简体   繁体   English

在Mac上运行Eclipse - 需要JVM 1.7或更高版本

[英]Running Eclipse on Mac - JVM Version 1.7 or greater is required

I downloaded Eclipse (specifically that for C/C++ Programming) for Mac, running OSX Mavericks. 我为Mac下载了Eclipse(特别是用于C / C ++编程的),运行OSX Mavericks。 When I try to start Eclipse, it gives me this message: "Version 1.6.0_65 of the JVM is not suitable for this product. Version 1.7 or greater is required", and it doesn't open. 当我尝试启动Eclipse时,它给了我这样的信息:“JVM的1.6.0_65版本不适用于此产品。需要1.7或更高版本”,并且它不会打开。 I installed Java version 7, but nothing changed. 我安装了Java版本7,但没有任何改变。 I don't know how else to update the JVM (I don't know much about Java in general). 我不知道如何更新JVM(我对Java一般不太了解)。

I downloaded the 64-bit version for my MacBook Air, if that matters. 如果重要的话,我为我的MacBook Air下载了64位版本。

只需安装JDK 7或JDK 8,而不仅仅是最新的JRE。

Run whereis java in a Terminal. 在终端中运行whereis java It will normally display something like /usr/bin/java . 它通常会显示/usr/bin/java

Now run java -version . 现在运行java -version It shows you 'java version 1.6.0_65' or something approaching. 它显示你'java版本1.6.0_65'或接近的东西。 This is because Java 7 does not replace Java 6. Java 7 is installed as an Internet Plug-in and can be found in /Library/Internet\\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java . 这是因为Java 7不能取代Java 6. Java 7作为Internet插件安装,可以在/Library/Internet\\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java

What you need to do is to symlink /usr/bin/java to /Library/Internet\\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java . 你需要做的是symlink /usr/bin/java/Library/Internet\\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java

Restart Eclipse, or reboot your computer (I don't know how Eclipse manages this), and it should do the trick. 重新启动Eclipse,或重新启动计算机(我不知道Eclipse如何管理它),它应该可以解决问题。 :) :)

I went to oracle downloads and the scrolled one of the several Mac osX links and downloaded jdk-8u73-nb-8_1-macosx-x64.dmg from oracle and that fixed the problem. 我去了oracle下载和滚动的几个Mac osX链接之一,并从oracle下载了jdk-8u73-nb-8_1-macosx-x64.dmg并解决了这个问题。 I don't know why updating java doesn't do the trick. 我不知道为什么更新java不能解决问题。

将此脚本添加到顶部 'eclipse.ini' '/ Library/java/JavaVirtualMachines/jdk1.8.0_77.jdk/contents/Home/bin'

Trying to install eclipse, I installed java version 1.6.0_65 as it requested yet still was blocked from finishing the Eclipse install with the error that I needed 1.7 JVM or higher - not true, installing higher didn't work either. 试图安装eclipse,我按照要求安装了java版本1.6.0_65但仍然被阻止完成Eclipse安装,错误是我需要1.7 JVM或更高 - 不是这样,安装更高版本也无效。 I tried installing jdk-8u101-macosx-x64.dmg and that didn't work. 我尝试安装jdk-8u101-macosx-x64.dmg但是没有用。 So, I tried JDK 7 as advised, sorry no good. 所以,我按照建议尝试了JDK 7,抱歉没有好处。

So, to get the Eclipse installer to run with out that java error I had to edit the Info.plist inside the Eclipse Installer. 因此,为了让Eclipse安装程序在没有java错误的情况下运行,我必须编辑Eclipse Installer中的Info.plist。 Right click the Eclipse installer and show package contents, then open info.plist in textEdit.app 右键单击Eclipse安装程序并显示包内容,然后在textEdit.app中打开info.plist

(Note: So after several tries editing this plist and following methods mentioned elsewhere nothing worked, I found that you have to use the symlink or java alias because java is installed differently now a days as an internet plugin.) (注意:经过多次尝试编辑此plist并在其他地方提到的方法之后没有任何效果,我发现你必须使用符号链接或java别名,因为java现在作为互联网插件安装不同。)

Where you want to make an edit (You should probably Backup the original or you can download it again), under <key>Eclipse</key> , then <array> , delete out what's there and add <string>-vm</string> and this string underneath; 你想要编辑的地方(你应该备份原文或者你可以再次下载),在<key>Eclipse</key> ,然后<array> ,删除那里的内容并添加<string>-vm</string>和下面的这个字符串; <string>/usr/bin/java</string>

Here is what mine looks like. 这是我的样子。

<key>Eclipse</key>
<array>
<string>-vm</string>
<string>/usr/bin/java</string>
<string>-keyring</string>
<string>~/.eclipse_keyring</string>
<string>-showlocation</string>
</array>

Then save and try running your eclipse installer; 然后保存并尝试运行您的eclipse安装程序; this worked for me. 这对我有用。

Just running the below command from there terminal worked for me. 刚从终端运行以下命令为我工作。

brew cask install java brew cask安装java

It updated my idk with 1.8, and after that eclipse opens successfully. 它用1.8更新了我的idk,之后eclipse成功打开。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Eclipse - “不兼容 JVM。JVM 的版本 1.8.0_261 不适用于此产品。需要版本:11 或更高版本” - Eclipse - "Incompatible JVM. Version 1.8.0_261 of the JVM is not suitable for this product. Version: 11 or greater is required" JVM 1.5.0版不适用于此产品。 版本:需要1.6或更高版本 - Version 1.5.0 of the JVM is not suitable for this product. Version: 1.6 or greater is required Eclipse 4.4(64bit Mac)需要JVM v1.7 + - Eclipse 4.4 (64bit mac) needs JVM v1.7+ JVM的1.5.0_30版本不适用于此产品。 需要OSX 1.6或更高版本 - Version 1.5.0_30 of the JVM is not suitable for this product. 1.6 or greater is required OSX jvm 版本 1.4.2_03 不适用于此产品。 1.5或更高是必需的问题 - version 1.4.2_03 of the jvm is not suitable for this product. 1.5 or greater is required problem Mac Eclipse错误“不兼容的JVM” - Mac Eclipse error “Incompatible JVM” 使用 brew 在 Mac 上安装 Zeppelin:需要 Java 1.7 - Install Zeppelin on Mac with brew : Java 1.7 is required Eclipse Eclipse在1.6以下运行,但需要1.7 - Eclipse Eclipse is running under 1.6, but 1.7 is needed Maven和Hsqldb:org.hsqldb.HsqlException:需要客户端驱动程序版本大于&#39;2.1.0.0&#39;。 HSQLDB服务器版本为&#39;2.3.4&#39;(在Mac上) - Maven and Hsqldb: org.hsqldb.HsqlException: Client driver version greater than '2.1.0.0' is required. HSQLDB server version is '2.3.4' (on mac) mac上的Eclipse安装错误(不兼容的JVM) - Eclipse installation error on mac (incompatible JVM)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM