简体   繁体   English

JRE版本是1.6.0; 运行Google Plugin for Eclipse需要1.7.0或更高版本

[英]JRE version is 1.6.0; version 1.7.0 or later is needed to run Google Plugin for Eclipse

I have 3 versions of Java installed on my system: 6, 7, and 8... I am required to have JRE6 available for a product my company develops, so I cannot get rid of it... But despite copying my Eclipse install to a new folder for another project I need to work on and removing JRE6 from this version alltogether, I still cannot get it to work. 我在我的系统上安装了3个版本的Java:6,7和8 ......我需要为我公司开发的产品提供JRE6,所以我无法摆脱它...但是尽管复制我的Eclipse安装到我需要处理的另一个项目的新文件夹,并从这个版本中删除JRE6,我仍然无法让它工作。

在此输入图像描述

How can I get the google plugin for Eclipse to work in my scenario? 如何让Eclipse的谷歌插件在我的场景中工作?

If you have created a shortcut to start eclipse, you can add a parameter to tell it to use the jre of your choice like this - 如果您已经创建了一个启动eclipse的快捷方式,您可以添加一个参数来告诉它使用您选择的jre,如下所示 -

C:\eclipse\eclipse.exe -vm "C:\Programs\jdk\jdk1.7.0_55\bin\javaw.exe"

I have used "javaw" executable from a jdk installation, but you may point to the same executable within a JRE installation as well. 我在jdk安装中使用了“javaw”可执行文件,但您也可以在JRE安装中指向相同的可执行文件。

This will resolve the error. 这将解决错误。

Keep in mind that there is a separation between the JVM that Eclipse itself is running in and the various JREs that you can configure in Eclipse to run your programs/applications. 请记住,Eclipse本身运行的JVM与您可以 Eclipse中配置以运行程序/应用程序的各种JRE之间存在分离。 You need to specify to Eclipse what JVM you want it to run under, using eclipse.ini . 您需要使用eclipse.ini向Eclipse指定要运行的JVM。

That's separate from the Installed JREs configuration you show in your screen shot above. 这与您在上面的屏幕截图中显示的已安装JRE配置分开。

Add Java 7.0 to Eclipse if you haven't: Window -> Preferences -> Java -> Installed JREs. 如果您还没有将Java 7.0添加到Eclipse:Window - > Preferences - > Java - > Installed JREs。

Next add Java 7.0 library to your project: Right click on project -> Properties -> Java Build Path -> Libraries tab -> Remove JRE 1.6 and add New Library (JRE System Library, 1.7.0). 接下来将Java 7.0库添加到项目中:右键单击项目 - >属性 - > Java构建路径 - >库选项卡 - >删除JRE 1.6并添加新库(JRE系统库,1.7.0)。

Last set Java 7.0 compliance level: Right click on project -> Preferences -> Java Compiler -> Compiler compliance level: 1.7 上次设置Java 7.0合规性级别:右键单击项目 - >首选项 - > Java编译器 - >编译器合规级别:1.7

Also since you can use different Java to run applications, you also have to change this in the Run configuration which you use to start AppEngine related tasks. 此外,由于您可以使用不同的Java来运行应用程序,因此您还必须在用于启动AppEngine相关任务的“运行”配置中对其进行更改。

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

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