Skip to content
Advertisement

Specific JDK in eclipse.ini for Eclipse IDE version 2020-09 use JDK 15, not default JDK what declared in system environment variable

Eclipse 2020-09, Error:

Version 1.8.0_261 of the JVM is not suitable for this product. Version: 11 or greater is required.

enter image description here

I must set Java environment to JDK 1.8 for Gradle work correctly in some case.

enter image description here

File eclipse.ini

-startup
plugins/org.eclipse.equinox.launcher_1.5.800.v20200727-1323.jar
--launcher.library
C:Usersdonhuvy.p2poolpluginsorg.eclipse.equinox.launcher.win32.win32.x86_64_1.1.1300.v20200819-0940
-product
org.eclipse.epp.package.jee.product
-showsplash
C:Usersdonhuvy.p2poolpluginsorg.eclipse.epp.package.common_4.17.0.20200910-1200
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=11
-Dosgi.instance.area.default=@user.home/eclipse-workspace
-XX:+UseG1GC
-XX:+UseStringDeduplication
--add-modules=ALL-SYSTEM
-Dosgi.requiredJavaVersion=11
-Dosgi.dataAreaRequiresExplicitInit=true
-Xms256m
-Xmx2048m
--add-modules=ALL-SYSTEM
-Declipse.p2.max.threads=10
-Doomph.update.url=http://download.eclipse.org/oomph/updates/milestone/latest
-Doomph.redirection.index.redirection=index:/->http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/
-vm C:Program FilesJavajdk-15bin

but Eclipse still not start.

My JDKs in my PC:

enter image description here

How to declare JDK 15 to eclipse.ini ?

Advertisement

Answer

-vm and C:Program FilesJavajdk-15binjavaw.exe have to be two lines directly before the line -vmargs, not after that line (see Eclipse wiki: eclipse.ini – Specifying the JVM):

-startup
plugins/org.eclipse.equinox.launcher_1.5.800.v20200727-1323.jar
--launcher.library
C:Usersdonhuvy.p2poolpluginsorg.eclipse.equinox.launcher.win32.win32.x86_64_1.1.1300.v20200819-0940
-product
org.eclipse.epp.package.jee.product
-showsplash
C:Usersdonhuvy.p2poolpluginsorg.eclipse.epp.package.common_4.17.0.20200910-1200
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vm
C:Program FilesJavajdk-15binjavaw.exe
-vmargs
-Dosgi.requiredJavaVersion=11
-Dosgi.instance.area.default=@user.home/eclipse-workspace
-XX:+UseG1GC
-XX:+UseStringDeduplication
--add-modules=ALL-SYSTEM
-Dosgi.requiredJavaVersion=11
-Dosgi.dataAreaRequiresExplicitInit=true
-Xms256m
-Xmx2048m
--add-modules=ALL-SYSTEM
-Declipse.p2.max.threads=10
-Doomph.update.url=http://download.eclipse.org/oomph/updates/milestone/latest
-Doomph.redirection.index.redirection=index:/->http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement