简体   繁体   中英

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.

在此输入图像描述

How can I get the google plugin for Eclipse to work in my scenario?

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 -

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.

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. You need to specify to Eclipse what JVM you want it to run under, using eclipse.ini .

That's separate from the Installed JREs configuration you show in your screen shot above.

Add Java 7.0 to Eclipse if you haven't: 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).

Last set Java 7.0 compliance level: Right click on project -> Preferences -> Java Compiler -> Compiler compliance level: 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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