Reputation: 1605
I am trying to run the Eclipse 2020-09. I have two JDKs installed (15 and 1.8) and one JRE (1.8). I have to keep my environment variables pointing to the JDK 1.8. Because everything I work on uses 1.8. Only Eclipse needs JDK 15. How do i get Eclipse to use the JDK 15? I have my eclipse.ini
file like this:
-startup
plugins/org.eclipse.equinox.launcher_1.5.800.v20200727-1323.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.1300.v20200819-0940
-product
org.eclipse.epp.package.jee.product
-showsplash
org.eclipse.epp.package.common
--launcher.defaultAction
openFile
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=11
[email protected]/eclipse-workspace
-XX:+UseG1GC
-XX:+UseStringDeduplication
--add-modules=ALL-SYSTEM
-Dosgi.requiredJavaVersion=11
-vm "C:\Program Files\Java\jdk-15\bin\javaw.exe"
-Dosgi.dataAreaRequiresExplicitInit=true
-Xms1536m
-Xmx3072m
--add-modules=ALL-SYSTEM
But it still doesn't boot up Eclipse. I keep getting the error saying my JDK is 1.8 and I need 11 or higher pop-up message. Please let me know what I am doing wrong here? Or if I need some more configuration changes.
Upvotes: 2
Views: 82
Reputation: 111142
-vm
and the path must be on separate lines and must be before the -vmargs line. No quotes around the path:
-startup
plugins/org.eclipse.equinox.launcher_1.5.800.v20200727-1323.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.1300.v20200819-0940
-product
org.eclipse.epp.package.jee.product
-showsplash
org.eclipse.epp.package.common
--launcher.defaultAction
openFile
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vm
C:\Program Files\Java\jdk-15\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=11
[email protected]/eclipse-workspace
-XX:+UseG1GC
-XX:+UseStringDeduplication
--add-modules=ALL-SYSTEM
-Dosgi.requiredJavaVersion=11
-Dosgi.dataAreaRequiresExplicitInit=true
-Xms1536m
-Xmx3072m
--add-modules=ALL-SYSTEM
Upvotes: 3