score:0

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,

  • eclipse ide for enterprise java developers (includes incubating components)
  • version: 2020-12 (4.18.0)
  • build id: 20201210-1552
  • os: linux, v.5.4.0-42-generic, x86_64 / gtk 3.22.30
  • java version: 14.0.2

score:0

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.

score:0

thank you . this one worked for me -vm
c:\program files\java\jdk-16\bin\javaw.exe added these lines in eclipse.ini file

score:0

adding an additional answer here as i was not able to start my eclipse even after updating the eclipse.ini file with the path of javaw.exe under the jdk. i was running into an exception that started as

java was started but returned exit code=1

i had to point to the java.dll file as suggested in https://wiki.eclipse.org/eclipse.ini#-vm_value:_windows_example. so my latest eclipse.ini looked like

-vm 
c:\program files\eclipse adoptium\jre-11.0.14.101-hotspot\bin\server\jvm.dll

also, when i installed jdk 11 it did not come with jre. i had to download the jre separately from https://adoptium.net/releases.html?variant=openjdk11&jvmvariant=hotspot

hope someone finds this useful.

score:0

check out your java version and update path and version... echo %java_home%\bin\javaw.exe c:\program files\java\jdk-18.0.1.1\bin\javaw.exe

-vm c:\program files\java\jdk-18.0.1.1\bin\javaw.exe -vmargs -dosgi.requiredjavaversion=18

score:1

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.

score:1

i had the same problem. uninstall java from the control panel and restart your ide (eclipse or intellij idea).

score:1

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

enter image description here

score:1

window => preferences => java => installed jres => add
(browse for adoptopenjdk 11) as shown in picture mark as default (only select this version => apply => save)

enter image description here

score:1

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:

  1. checked the installed versions

    ls /usr/lib/jvm

  2. set latest version (16 in my case)

    sudo archlinux-java set java-16-jdk

score:1

i had the same issue and the following easy steps fixed the issue

step - 1

go to the file location of the eclipse and open eclipse.ini in editable format

step - 2

go to the java folder location where you find javaw.exe
in my case : c:\program files\java\jdk-11.0.11\bin\javaw.exe

step - 3

then paste the following before tag -vmargs inside eclipse.ini file

-vm
c:\program files\java\jdk-11.0.11\bin\javaw.exe

the below image shows in brief

enter image description here

score:6

i had the same problem and i downloaded another version of java ee eclipse. i got the eclipse 2020-06 (4.16):

https://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/2020-06/r/eclipse-jee-2020-06-r-win32-x86_64.zip

after downloading it, it worked.

score:7

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.

score:10

to resolve the incompatible jvm exception, specify the specific jvm for eclipse.

  1. open the eclipse folder and look for the eclipse.ini file.
  2. before the -vmargs option, add the -vm option.
  3. find and copy the path of the javaw.exe file in the jdk folder
  4. in the eclipse.ini file, add the path of the javaw.exe file to the new line following the -vm option.
  5. restart eclipse after saving the eclipse.ini file.

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/

score:19

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.

score:25

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

score:78

i got it resolved by adding the vm parameters in the eclipse configuration file at the top.

enter image description here

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

score:171

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.


Related Query

More Query from same tag