When Eclipse is started, it is incompatible with the JDK in the environment variable and can be independently developed for the JRE running by Eclipse.
Method:
Add the-VM parameter to the Eclipse configuration file.
To open the Eclipse.ini configuration file under the Eclipse directory and add the-VM configuration, note that this parameter should be added before -vmargs
Eclipse.ini configuration file:
-startup
PLUGINS/ORG.ECLIPSE.EQUINOX.LAUNCHER_1.3.0.V20140415-2008.jar
--launcher.library
PLUGINS/ORG.ECLIPSE.EQUINOX.LAUNCHER.WIN32.WIN32.X86_64_1.1.200.V20140603-1326
-product
Org.eclipse.epp.package.jee.product
--launcher.defaultaction
OpenFile
--launcher. Xxmaxpermsize
256M
-showsplash
Org.eclipse.platform
--launcher. Xxmaxpermsize
256m
--launcher.defaultaction
OpenFile
--launcher.appendvmargs
-vm
D:/parta/java64bit/jre7/bin/server/jvm.dll
-vmargs
-dosgi.requiredjavaversion=1.6
-xms40m
-xmx512m
Modify the JRE that Eclipse uses when Eclipse starts