Eclipse startup requires a default jdk (the default is configured in the environment variable), so how to use a custom jdk version? as follows:
1. First download a green version of jdk
2. Delete the three files java.exe, javaw.exe, javaws.exe under C:\Windows\System32
3. Modify the eclipse.ini file under eclipse, the eclipse version here is oxygen, the file is as follows
-startup
plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.551.v20171108-1834
-product
org.eclipse.epp.package.jee.product
-showsplash
org.eclipse.epp.package.common
--launcher.defaultAction
openFile
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vm
E:\JDK18077\jdk1.8.0_77\jre\bin\server\jvm.dll
-vmargs
-Dosgi.requiredJavaVersion=1.8
[email protected]/eclipse-workspace
-XX:+UseG1GC
-XX:+UseStringDeduplication
--add-modules=ALL-SYSTEM
-Dosgi.requiredJavaVersion=1.8
-Xms256m
-Xmx1024m
--add-modules=ALL-SYSTEM
What is added is the red font part, pay attention to the location, the path is the green version of the jdk location, ok is done!