I just downloaded Eclipse as an archive and installed newest 64 bit Java and 64 bit Java Development Kit 15. And I get this error. I installed JDK 11 after and got the same error.
How can I make this work?
I had the same problem and I downloaded another version of Java EE Eclipse. I got the Eclipse 2020-06 (4.16):
After downloading it, it worked.
I had the same issue and got it to work by reinstalling using the installer from https://www.eclipse.org/downloads/ which includes a JRE.
I downloaded JDK from https://www.oracle.com/java/technologies/javase-jdk15-downloads.html and put the unpacked contents to jre subdirectory of Eclipse's installation path - there is a path eclipse/jre/bin/javaw.exe. Eclipse picks it up automatically over any other installation.
I got it resolved by adding the vm parameters in the Eclipse configuration file at the top.
In text format
-vm
C:\Program Files\Java\jdk-11.0.9\bin\javaw.exe
-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
-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
For Ubuntu users, refer to the answer https://stackoverflow.com/a/64049648/14489697 by howlger. Add the following lines in file eclipse.ini before -vmargs:
-vm
/usr/lib/jvm/adoptopenjdk-14-openj9-amd64/bin/java
Above is the Java install location. Change this according to yours.
I'm using,
This works for me. Make sure you add -vm(Path_Of_Jdk) on top of -vmargs of eclipse.ini
E.g.,
-vm
C:\Program Files\Java\jdk-11.0.10\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=11
I had the same problem. Uninstall Java from the control panel and restart your IDE (Eclipse or IntelliJ IDEA).
I also faced the same issue, but I did not resolve it no matter what.
Then it got resolved installing the below link.
https://www.eclipse.org/downloads/download.php?file=/oomph/epp/2020-09/R/eclipse-inst-jre-win64.exe
The Java to run Eclipse can be specified in the eclipse.ini file (see Eclipse wiki: eclipse.ini - Specifying the JVM). Add the following two lines directly before the line -vmargs and adapt the path to your Java 11 or higher 64-bit Java VM installation directory:
-vm
C:\Program Files\AdoptOpenJDK\jdk-14.0.2.12-openj9\bin\javaw.exe
Alternatively, you can put the Java VM into the jre subdirectory of the Eclipse installation or, if you do not install Eclipse but upgrade it, install Java 11 or better Java 14 as plugin before the upgrade from Eclipse JustJ (use JustJ OpenJDK Hotspot JRE Complete, not Base or Minimal).
Please note, that even if you run Eclipse with Java 11 or higher, Eclipse 2020-09 (4.17) still supports to code in Java 14, 13, 12, 11, 10, 9, 8 and even much older versions (down to Java 1.1). Java 15 can be installed via Marketplace.
If you're looking to resolve this without changing eclipse.ini file, just reinstall eclipse IDE. It can be the same version or newer one. I have reinstalled the same version and it's worked without issues, no needing of changing eclipse.ini.
I found this topic while having this issue starting dBeaver on Manjaro/Arch Linux with the same error. All provided suggestions did not work in my case.
My solution was to set the JVM as per this post on the Manjaro Forum:
checked the installed versions
ls /usr/lib/jvm
set latest version (16 in my case)
sudo archlinux-java set java-16-jdk
To resolve the incompatible JVM Exception, specify the specific JVM for Eclipse.
As a result, the eclipse.ini file looks like this:
-startup
plugins/org.eclipse.equinox.launcher_1.6.200.v20210416-2027.jar
--launcher.library
C:\Users\Admin\.p2\pool\plugins\org.eclipse.equinox.launcher.win32.win32.x86_64_1.2.200.v20210429-1609
-product
org.eclipse.epp.package.java.product
-showsplash
C:\Users\Admin\.p2\pool\plugins\org.eclipse.epp.package.common_4.20.0.20210612-1200
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vm //NEW
C:\Program Files\Java\jdk-16\bin\javaw.exe //NEW
-vmargs
-Dosgi.requiredJavaVersion=11
-Dosgi.instance.area.default=@user.home/eclipse-workspace
-Dsun.java.command=Eclipse
-XX:+UseG1GC
-XX:+UseStringDeduplication
--add-modules=ALL-SYSTEM
-Dosgi.requiredJavaVersion=11
-Dosgi.dataAreaRequiresExplicitInit=true
-Dorg.eclipse.swt.graphics.Resource.reportNonDisposed=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/
I was getting this error on a Linux OS, but the following solution should work for all OSes.
Step 1: Open a command prompt
Type: java -version
You will see something like this -
openjdk version "1.8.0_275"
OpenJDK Runtime Environment (build 1.8.0_275-8u275-b01-0ubuntu1~16.04-b01)
OpenJDK 64-Bit Server VM (build 25.275-b01, mixed mode)
(may vary depending on your computer and OS)
Step 2: open the eclipse.ini file
The file is located at C:\Users\Yourusername\eclipse\java-2019-12\eclipse
Locate the following line -
-Dosgi.requiredJavaVersion=11
Change it to
-Dosgi.requiredJavaVersion=1.8
and restart Eclipse. It is there twice so change at both places. You may try to give the Java version specific to your system (from the output of step 1). This has worked for me.
Window => Preferences => Java => Installed JREs => Add
(browse for AdoptOpenJdk 11) as shown in picture Mark as default (Only Select this Version => Apply => Save)