简体   繁体   English

错误:运行eclipse的Google插件需要jdk1.7或更高版本

[英]Error: jdk1.7 or higher needed to run Google plugin for eclipse

I have been trying to make this work all day long but there seems to be no end to my frustration. 我整天都在努力进行这项工作,但似乎无休止。 I want to use Google App Engine for my android application. 我想将Google App Engine用于我的android应用程序。 I have downloaded the jdk 1.7 u51 but still whenever i start the eclipse ADT, a dialog box appears saying that jdk 1.6 is in use; 我已经下载了jdk 1.7 u51,但是无论何时我启动eclipse ADT,都会出现一个对话框,提示正在使用jdk 1.6。 jdk 1.7 or higher needs to be installed. 需要安装jdk 1.7或更高版本。 I have set the path in the preference to jre inside the jdk 1.7. 我已将偏好设置中的路径设置为jdk 1.7中的jre。 Also, the app engine SDK path shows the error "Failed to initialize App Engine SDk[path]". 此外,App Engine SDK路径显示错误“无法初始化App Engine SDk [path]”。 I have referred all the threads here and over the internet relating to this issue and have tried all the proposed solutions but to no avail. 我已经在这里和互联网上引用了与此问题相关的所有线索,并尝试了所有建议的解决方案,但均无济于事。 Any help would be greatly appreciated. 任何帮助将不胜感激。

versions eclipse 4.2(ADT) JDK 1.7u51 App Engine SDK 1.8.9 版本 eclipse 4.2(ADT)JDK 1.7u51 App Engine SDK 1.8.9

Try uninstalling the old java version, and making sure that the latest version is the only one installed. 尝试卸载旧的Java版本,并确保最新版本是唯一安装的版本。 Another problem might be if you have a 64-bit computer, you may have the older version installed to one program files, but Eclipse is looking through the x86 program files and not finding the correct version(or vice-versa). 另一个问题可能是,如果您有一台64位计算机,则可能已将旧版本安装到一个程序文件中,但是Eclipse正在浏览x86程序文件,而没有找到正确的版本(反之亦然)。 You may also want to set your PATH and CLASSPATH. 您可能还需要设置PATH和CLASSPATH。

Type 类型

java -version

javac -version

into the command prompt, and it will return with what Java you have installed. 进入命令提示符,它将返回您已安装的Java。 If all else fails, try reading https://developers.google.com/appengine/docs/java/gettingstarted/installing for more information and see what went wrong. 如果所有其他方法均失败,请尝试阅读https://developers.google.com/appengine/docs/java/gettingstarted/installing以获取更多信息,并查看出了什么问题。

You must have matching architecture for Eclipse and JDK. 您必须具有与Eclipse和JDK匹配的体系结构。 If you are using 32-bit eclipse, then use 32-bit JDK else use 64-bit versions of both. 如果使用的是32位Eclipse,则使用32位JDK,否则请使用两者的64位版本。

Everything else will fall in place automatically 其他一切将自动放置

I am using Indigo and found this forum thread to do the trick. 我正在使用Indigo,并找到了该论坛主题来解决问题。

To your eclipse.ini file add 在您的eclipse.ini文件中添加

-vm
/Library/Java/JavaVirtualMachines/jdk1.7.0_WHATEVERTHESUFFIXIS/Contents/Home/jre/lib/server/libjvm.dylib

Note the suffix "lib/server/libjvm.dylib" which is not what you use for later versions of Eclipse. 注意后缀“ lib / server / libjvm.dylib”,它不是您在更高版本的Eclipse中使用的后缀。 (For them you link to "bin/java".) This needs to be above any "-vmargs" flags in eclipse.ini. (对于他们,您链接到“ bin / java”。)这需要在eclipse.ini中的所有“ -vmargs”标志之上。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM