217

I am getting this error message when I start Eclipse Helios on Windows 7:

Failed to create the Java Virtual Machine

Enter image description here

My eclipse.ini looks as follows:

-startup
plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
-vm
P:\Programs\jdk1.6\bin
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.0.v20100503
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
512m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms120m
-Xmn100m
-Xmx1024m

My JAVA_HOME is correctly set as far as I can tell. How can I fix this?

Things I have tried so far:

  1. Adding the full path to javaw.exe -vm P:\Programs\jdk1.6\bin\\bin\javaw.exe
  2. Removing the -vm option altogether
  3. Removing --launcher.XXMaxPermSize fixes the issue, but it causes permgen errors
  4. Removing the value 512 of --launcher.XXMaxPermSize fixes the issue, but it causes permgen errors
  5. Reducing -Xmx to 512m also fixes the issue.

Why can I not use '1024m' for '-Xmx' and '--launcher.XXMaxPermSize'?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Maro
  • 4,065
  • 7
  • 33
  • 34
  • 18
    It means jvm can't allocate the required memory space(1024+512) in your computer. – Kane Sep 05 '11 at 02:39
  • So just to confirm I understand this correctly. The JVM will allocate the amount of memory specified by (XXMaxPermSize + Xmx) – Maro Sep 05 '11 at 02:57
  • 2
    It doesn't immediately create the memory with maximum heap size(specified by -Xmx) when starting vm. But it would make sure it has capability to create the maximum heap size in runtime when starting vm. If not, the vm can't be created. – Kane Sep 05 '11 at 05:05
  • I have no idea why, but on my machine Eclipse only has this problem when Dragon NaturallySpeaking is running. RonQi's solution worked for me. – rob Jul 17 '12 at 05:20
  • @rob: That's probably because Dragon uses a lot of memory. The cause for this issue seems to be that the JVM cannot allocate enough memory. – Stijn de Witt Feb 18 '13 at 14:14
  • Follow the instructions on the official website to solve this issue http://wiki.eclipse.org/Eclipse.ini#Specifying_the_JVM – saravanan saminathan Oct 08 '21 at 17:02

43 Answers43

284

1. Open the eclipse.ini file from your eclipse folder,see the picture below.

eclipse.ini

2. Open eclipse.ini in Notepad or any other text-editor application, Find the line -Xmx256m (or -Xmx1024m). Now change the default value 256m (or 1024m) to 512m. You also need to give the exact java installed version (1.6 or 1.7 or other).

max size

Like This:

-Xmx512m
-Dosgi.requiredJavaVersion=1.6

OR

-Xmx512m
-Dosgi.requiredJavaVersion=1.7

OR

-Xmx512m
-Dosgi.requiredJavaVersion=1.8

Then it works well for me.

Akhil Jain
  • 13,872
  • 15
  • 57
  • 93
  • 9
    This will only work if the problem was not enough memory and if you *lower* the values in eclipse.ini. Raising them will only make this issue more probable to occur. – Stijn de Witt Feb 18 '13 at 14:17
  • 2
    Thanks yar, I increased this value and it worked fine, I think it happened because I updated JDK. – Pervez Alam Apr 30 '13 at 09:02
  • 1
    This actually worked for me also - NB: ewclipse just stopped working - I had `-Xmx1024m`, turned to `Xmx512m` and worked. Apparently not enough memory was there (?) – Mr_and_Mrs_D Jan 31 '14 at 15:10
  • In My Case it did not work on changing the value to 512 from 1024 but when I again changed it to the previous value i.e 1024 it worked. – TaRan LaYal Feb 19 '15 at 05:52
  • 1
    Wow.. For Eclipse Mars, I changed -Xmx1024m to -Xmx512m and it worked! – Umesh Patil Dec 03 '15 at 14:25
  • For Eclipse Neon 3 removing the options below helps to resolve the same problem `-XX:+UseG1GC` `-XX:+UseStringDeduplication` – Stanislau Fink Apr 26 '17 at 21:31
117

Try to add

-vm
D:\Java\jdk1.6.0_29\bin\javaw.exe

FYI: Refer sunblog

For others who might have problems with Java 7, as per Eclipse Wiki - eclipse.ini vm_value (windows example)

This might not work on all systems. If you encounter "Java was started but returned exit code=1" error while starting the eclipse, modify the -vm argument to point to jvm.dll

e.g.

-vm
C:\Program Files\Java\jre7\bin\client\jvm.dll

Also note that

The -vm option must occur before the -vmargs option, since everything after -vmargs is passed directly to the JVM

Eddie
  • 53,828
  • 22
  • 125
  • 145
RonQi
  • 1,247
  • 2
  • 8
  • 9
  • This works great, but I prefer using -vm C:\Program Files (x86)\Java\jre6\bin\javaw.exe since the JRE path is more likely to remain stable, especially if you're sharing a single Eclipse installation across multiple machines/VMs. – rob Jul 17 '12 at 05:19
  • it worked for me to but while loading eclipse is getting hanged at org.eclipse.debug.core – Rahul Razdan Oct 09 '12 at 05:59
  • 7
    +1 I was missing the ordering part. All the other places on the net they talk about the -vm argument but they neglect to say it must occur before -vmargs – demongolem May 05 '13 at 02:39
  • I was facing the same issue while installing Android SDK with eclipse and this fixed it. Thanks ! – codingscientist Dec 06 '13 at 12:30
  • For record, I am using Windows 7 Home Premium and Server JVM 1.8.0_05, the second method, by pointing to the dll worked for me, the first method did not. – Ironluca Mar 18 '17 at 15:10
  • This fixed it, but since every other arg in the .ini file is on one line I unfortunately also put this -vm arg together on one line instead of two. So WATCH OUT, it must be on two lines as shown. I wasted a lot of precious time because of this (and no I won't reveal how much) – mwarren Jan 19 '22 at 16:16
82

Try removing the -vm P:\Programs\jdk1.6\bin lines.


Also, a general recommendation: set -Dosgi.requiredJavaVersion=1.6, not 1.5.

Matt Ball
  • 354,903
  • 100
  • 647
  • 710
  • 52
    in eclipse.ini, changing reducing -Xmx to 512m from 1024 fixed the issue for me. The system was having 1GB RAM. – Dexter Jul 17 '14 at 09:26
  • 3
    @dexter, thank you, it worked for me, by decreasing Xmx – danisupr4 Sep 02 '14 at 02:47
  • 2
    for macos eclipse-2020, add :"-vm" "/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/bin/java" below "--launcher.appendVmargs" in eclipse.ini. – clark yu Mar 30 '20 at 02:58
  • @Dexter how is 1GB Ram related to 512 – Ananthu K Kumar Sep 22 '21 at 04:31
  • @WadeWatts sorry I don't recall it properly now. But I think- they system was having 1 GB RAM. If we allocate full RAM to eclipse itself, it cause problem. So reduce it to 512 MB, leaving 512 MB for other processes. Eclipse process will not cause problem then. – Dexter Sep 22 '21 at 09:25
26

I know this is pretty old now but I have just had the same issue and the problem was I was allocating to much memory to eclipse that it could not get hold of. So open eclipse.ini and lower the amount of memory that is being allocated to -Xmx XXMaxPermSize I changed mine to -Xmx512m and XXMaxPermSize256m

Popeye
  • 11,839
  • 9
  • 58
  • 91
  • Is this on a 32bit machine? Cause I believe there is a limit on the how much memory you can use on 32bit windows – Maro Sep 16 '12 at 22:52
  • @Maro Yes it was. Looking at getting upgraded to 64bit. – Popeye Sep 17 '12 at 19:10
  • 1
    Worked for me, replaced 768m with 512m on -Xmx parameter. – tartak Feb 16 '13 at 09:41
  • I am on a 64-bit machine with 8GB of memory but still using -Xmx=768m in combination with -XX:PermSize=256m and -XX:MaxPermSize=512m proved to be too much. It is a 32 bit Java so it can 'only' use 4GB, but the max seems to be much lower in practice. I would expect this to need 1024m to start and 1280m max... – Stijn de Witt Feb 18 '13 at 14:21
  • Thanks I am sure that I changed it to 1024 a few months back to get around the problem. The real answer to this question is move to Android Studio, it is much nicer. I only came back to Eclipse because I had not migrated one of my older apps and needed to do something. – Ryan Heitner Nov 03 '13 at 11:27
21

I removed eclipse.ini. I encountered this issue and removing the ini file solved it.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Monnster
  • 625
  • 7
  • 16
18
  1. Open the eclipse.ini file from your eclipse folder.

  2. It has some of add on configuration . Find the line –launcher.XXMaxPermSize. Now remove the the default value 256m and save it.

Florent
  • 12,310
  • 10
  • 49
  • 58
Furqi
  • 2,403
  • 1
  • 26
  • 32
12
  1. Open folder with Eclipse.exe and find eclipse.ini file
  2. Replace -vmargs by your current real path of javaw.exe: *-vm “c:\Program Files\Java\jdk1.7.0_07\bin\javaw.exe”*

    -startup
    plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
    --launcher.library
    plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120522-1813
    -product
    com.android.ide.eclipse.adt.package.product
    --launcher.XXMaxPermSize
    256M
    -showsplash
    com.android.ide.eclipse.adt.package.product
    --launcher.XXMaxPermSize
    256m
    --launcher.defaultAction
    openFile
    **-vm “c:\Program Files\Java\jdk1.7.0_07\bin\javaw.exe”** 
    -Dosgi.requiredJavaVersion=1.6
    -Xms40m
    -Xmx768m
    -Declipse.buildId=v21.1.0-569685
    
A Garhy
  • 423
  • 4
  • 8
11

I found a very easy solution for this. Just delete eclipse.ini file, but backup first. I had this same problem many times and finally I deleted this and I no more have the problem.

It also increased loading time. Now my Eclipse starts faster than earlier.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
user3739970
  • 591
  • 2
  • 13
  • 28
  • After deleting the *eclipse.ini* , I am getting this error, when tried to start Eclipse => *the eclipse execute launcher was unable to locate its companion shared library* – NIKHIL CHAURASIA Jun 28 '17 at 15:17
  • awesome! i tried so many steps to edit the ini file. but this answer is great. it works. cheers! – edge Nov 16 '17 at 11:56
9

You can also solve this issue by removing the value "256m" under the line "-launcher.XXMaxPermSize”.

Yasir Ali
  • 1,785
  • 1
  • 16
  • 21
  • Worked for me. Though even with that value there, it used to work just fine after Windows Log Off and then Log In. – amar Apr 19 '13 at 05:51
8
  1. Open the ecplise.ini file which is located in the eclipse installation folder.

  2. Find & Replace the line -vmargs with -vm D:\jdk1.6.0_23\bin\javaw.exe OR just remove the line -vmargs and save it . Now the problem is getting solved

Rajas Gujarathi
  • 716
  • 1
  • 9
  • 20
7

In STS.conf file you need to check two important things to avoid create/allocate jvm issue

1. Give the exact jdk install location:

--vm C:\Program Files\Java\jdk1.7.0_01\jre\bin\javaw.exe

2. You need to give the exact java installed version:

--Dosgi.requiredJavaVersion=1.7

3. Try to reduce the memory size:

--XX:MaxPermSize=256m
newfurniturey
  • 37,556
  • 9
  • 94
  • 102
5

After trying the above solution of reducing the memory, Eclipse starts working but hangs every time while loading the plugins from the work-space specially at org.eclipse.debug.core.

I found the solution here, Eclipse hangs at Splash Screen, and want share it. Hopefully it can help others as well.

newfurniturey
  • 37,556
  • 9
  • 94
  • 102
Rahul Razdan
  • 419
  • 4
  • 11
4

Make sure eclipse.ini do not have multiple entry and used vm entry before vmargs:

-vm
  D:/java/jdk1.8.0_65/bin/javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.8
-Dosgi.instance.area.default=@user.home/eclipse-workspace
-XX:+UseG1GC
-XX:+UseStringDeduplication
-Dosgi.requiredJavaVersion=1.8
-Xms256m
-Xmx1024m
Sunil Shakya
  • 8,097
  • 2
  • 17
  • 20
3

Try this one:

-startup plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar 
--launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.2.R36x_v20101222 
-showsplash org.eclipse.platform 
--launcher.XXMaxPermSize 256m 
--launcher.defaultAction openFile 
-vm F:\Program Files\jdk1.6\bin\javaw.exe 
-vmargs 
-Xms512m 
-Xmx512m 
-XX:+UseParallelGC 
-XX:PermSize=256M 
-XX:MaxPermSize=512M
iikkoo
  • 2,810
  • 6
  • 33
  • 38
3

This may work:

Open eclipse.ini file and paste below lines at the end of the lines.

-vmargs
-Xms40m
-Xmx512m
-XX:MaxPermSize=256m
UdayKiran Pulipati
  • 6,579
  • 7
  • 67
  • 92
3

Quick fix:

Change -Xmx1024m to -Xmx512m in eclipse.ini (file located at the same level where eclipse.exe is present). And it will work like a charm.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Sumoanand
  • 8,835
  • 2
  • 47
  • 46
3

The simple way to fix this problem is just to delete or rename your eclipse.ini file. Try it first. If this method does not resolve your problem, try the solutions described below.

Other ways to fix it:

Solution 1

Add a string into the eclipse.ini file which change a destination of the javaw.exe file. The main thing is that this string must be placed above the string "-vmargs"!

-vm
C:\Program Files\Java\jdk1.6.0_22\bin\javaw.exe 

Solution 2

Remove the value of –launcher.XXMaxPermSize, like 256m.

Solution 3

Remove or decrease the values of Xms and Xmx:

-Xms384m 
-Xmx384m
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Dimon
  • 790
  • 1
  • 10
  • 24
3

After adding -vm in eclipse.ini as shown below worked for me. Add it before -vmargs do not remove it

-vm
C:\apps\Java\jdk1.8.0_92\bin\javaw.exe
-vmargs

There was a jdk update which was causing this issue.

Dinesh M
  • 674
  • 2
  • 7
  • 18
3

The proper solution to your problem is to add the -vm line pointing to jvm.dll file of your Java folder in ini fie.

-vm
C:\Program Files\Java\jre1.8.0_202\bin\server\jvm.dll
/*there is no dquote for path, and path points to right java version folder mentioned in ini file*/

If the above fix is not fruitful, then do not attempt anything else. Most of the advice in this thread is misguided. Some of these hacks might work temporarily or on certain machine configurations, but the contents of eclipse.ini are not trivial nor arbitrary. For the authoritative reference, see this [wiki page]:https://wiki.eclipse.org/Eclipse.ini#Specifying_the_JVM that explains the contents of the file. Also note the See Also links at the bottom of that page for more details about things like heap size, etc. DO NOT delete eclipse.ini, EVER. It is also inadvisable to remove the -vm or Xmx options. If you do, you're asking for trouble.

Here are references from the wiki page pertaining to your problem:

Reference_1

Reference_2

Vishwesh GM
  • 35
  • 1
  • 12
  • 1
    a simple but important pint to mention: `-vm` has to be placed **before** `-vmargs` option in eclipse.ini. – woodz Mar 13 '19 at 10:51
2

This worked for me:

I closed all the other memory intensive applications on my Windows 7 machine. And I tried to open Eclipse, and, voila, it worked.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
amalBit
  • 12,041
  • 6
  • 77
  • 94
2

Some time it's not your eclipse.ini; it's your JDK which is crashed. You can check it by writing following command in a command prompt:

c:\> java -version

If this command shows the following error:

Error occurred during initialization of VM

java/lang/NoClassDefFoundError: java/lang/Object

Then first uninstall JDK and reinstall it.

Eclipse will be in action again ;) As today I have got the same problem, and the above is suggested by Itachi Uchiha.

Community
  • 1
  • 1
TheLittleNaruto
  • 8,325
  • 4
  • 54
  • 73
2

Faced the issue when my Eclipse proton could not start. Got error "Failed to create the Java virtual machine"

Added below to the eclipse.ini file

-vm
C:\Program Files\Java\jdk-10.0.1\bin\javaw.exe
vkg
  • 351
  • 4
  • 10
2

You need to add javaw.exe full path with forward slash i.e. / instead \ to eclipse.ini even you are on Windows. Like below:

-vm
C:/Program Files/Java/jdk-14/bin/javaw.exe

Also the above lines must be placed before -vmargs.

Abdollah
  • 4,579
  • 3
  • 29
  • 49
1

Adding this fixed the issue for me:

-vm

D:\Java\jdk1.6.0_29\bin\javaw.exe
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
mze3e
  • 438
  • 2
  • 5
  • 14
1

Reduce param size upto -256

See my eclipse.ini file

    -startup
   plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
   --launcher.library
  plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502
  -product
   org.eclipse.epp.package.jee.product
   --launcher.defaultAction
   openFile
   --launcher.XXMaxPermSize
   256M
  -showsplash
   org.eclipse.platform
   --launcher.XXMaxPermSize
   256M
  --launcher.defaultAction
  openFile
  -vmargs
  -Dosgi.requiredJavaVersion=1.6
  -Xms40m
  -Xmx512m
Youdhveer
  • 529
  • 5
  • 10
1

enter image description herei had that following issue. so i did was find that eclipse.ini file in the eclipse installation folder. then i edited that as follows

then i edited as follows add java jdk file desitination for -vm.remove XX things and add XX:MaxPermSeze=256

pamal Sahan
  • 451
  • 3
  • 7
0

I was facing the same problem, and I found the solution. There are issues in allocation of MaxPermSize. If you try to allocate more than your machine's free space then it gives this error in my issue. So try to reduce MaxPermSize.

I think it will help you to sort out your issue.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
0

All these solutions failed me. This happened to me out of the blue after using Eclipse for six months. It seems somehow my JDK got corrupted.

My eventual solution was to download a newer JDK and update my JAVA_HOME accordingly, from jdk1.6.0_37 to jdk1.6.0_43 in my case.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Ryan Heitner
  • 13,119
  • 6
  • 77
  • 119
0

@Maro For me it worked very simply!

After getting the error message alert, I executed 'eclipsec.exe' from a command prompt. This opened Eclipse. Then again I tried with 'eclipse.exe' and now it's working nice and well.

Unfortunately, it didn't give any technical reason for this.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Satyendra
  • 1,635
  • 3
  • 19
  • 33
0

For me it solved by changing the JDK bin path in the Path environment variable. Put the JDK bin path which has jre/bin/client/jvm.dll under JDK home.

Srihari Karanth
  • 2,067
  • 2
  • 24
  • 34
0

In my case this problem occured after updating Java from 1.6 to 1.7.

To understand the error, run java.exe in the folder of eclipse.exe. Use parameters from eclipse.ini as it will show which parameter causes the failure.

For example:

F:\Mobile Class\adt-bundle-windows-x86\adt-bundle-windows-x86\eclipse>java -star
tup plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar --launcher.lib
rary plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120522-1813
 -product com.android.ide.eclipse.adt.package.product --launcher.XXMaxPermSize 7
68m  -showsplash org.eclipse.platform --launcher.XXMaxPermSize 768m --launcher.d
efaultAction openFile -vm C:\Program Files\Java\jre7\bin\client\jvm.dll -vmargs
-Dosgi.requiredJavaVersion=1.6 -Declipse.buildId=v21.1.0-569685 -Xms40m -Xmx768m

Unrecognized option: -startup
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

So I changed 'startup' swith to 'jar' like below and problem fixed:

F:\Mobile Class\adt-bundle-windows-x86\adt-bundle-windows-x86\eclipse>java -jar
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar --launcher.library
 plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120522-1813 -pr
oduct com.android.ide.eclipse.adt.package.product --launcher.XXMaxPermSize 768m
-showsplash org.eclipse.platform --launcher.XXMaxPermSize 768m --launcher.defaul
tAction openFile -vm C:\Program Files\Java\jre7\bin\client\jvm.dll -vmargs -Dosg
i.requiredJavaVersion=1.6 -Declipse.buildId=v21.1.0-569685 -Xms40m -Xmx768m
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
VSB
  • 9,825
  • 16
  • 72
  • 145
0

STEPS TO SOLVE THE ISSUE :-

  1. Open the eclipse.ini file from your eclipse folder.

  2. It has some of add on configuration . Find the line –launcher.XXMaxPermSize.It will be the last line in this file. Now remove/delete the the default value 256m and save it.

Nikhil Kumar
  • 2,618
  • 3
  • 21
  • 24
0
-vm D:\Java\jdk1.6.0_29\bin\javaw.exe
Ashkan Mobayen Khiabani
  • 33,575
  • 33
  • 102
  • 171
Aman
  • 51
  • 5
0

Go to Task Manager, end all unnecessary tasks, and start Eclipse. You will not get this error. Try it; it worked for me :)

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
0

One Eclipse window was already opened on my machine and when I tried to open another Eclipse instance, I got this error. I just closed my open Eclipse windows and then launched another. And there was no such error anymore :)

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
AndroidGuy
  • 1,270
  • 4
  • 15
  • 32
0

After failing with the above proven steps, I tried something after deciding to re-install.

Added : %\USER PATH\Java\jdk1.6.0_39\bin to Environment Variables

Deleted: eclipse configuration file

Re-run : eclipsec.exe

Now everything from projects is back working.

srina
  • 33
  • 10
0

All I had to do was to remove -vm from the eclipse.ini file and return. This time it will tell you where it is looking for javaw.exe so you can go there and delete the symbolic link. Make sure you have JAVA_HOME defined to your jdk path.

wscourge
  • 10,657
  • 14
  • 59
  • 80
Ashburn RK
  • 450
  • 3
  • 8
0

I remove -XX:+UseStringDeduplication from eclipse.ini . If you run eclipsec.exe you get better descryiption .

Amin Arab
  • 530
  • 4
  • 19
0

I tried All the above things, nothing worked for me. Follow the steps to check further:

  1. Check the java version in cmd: java -
  2. Add -vm javapath
  3. If you have installed any java version latest/previous versions,Go to the java folder,check if it has any Jre folder along with JDK.(Ex-JDK 1.7 along with jre1.7)
  4. GO to Control panel, uninstall that particular java runtime envionment(JRE).
  5. Now you should be able to run eclipse.
quicklikerabbit
  • 3,257
  • 6
  • 26
  • 39
Shkfar
  • 23
  • 1
  • 8
0

The problem appeared first right after patching DCEVM with version: DCEVM-8u181-installer.jar.

Then, temoving the flag -XX:+UseG1GC from eclipse.ini it fixed the issue.

fidudidu
  • 399
  • 3
  • 10
0

I was also facing this issue. You might have more than JAVA versions installed. Make sure that JAVA_HOME variable is set to the correct version.

0

For MacOSX and Homebrew users:

Given you installed Eclipse via homebrew: brew install --cask eclipse-java.rb Then it might not find your Java SDK, so open up your eclipse.ini file in ~/.homebrew/Caskroom/eclipse-java

And add the following line to eclipse.ini above vmargs:

-vm /Library/Java/JavaVirtualMachines/amazon-corretto-8.jdk/Contents/Home/bin

Daniel Viglione
  • 8,014
  • 9
  • 67
  • 101
0

Go to configuration panel and follow enter image description here

Change your variable JAVA_HOME to the JDK you use. In my case i change for last version of java for new proyects and the eclipse for older proyects cant run because of this.

Pichitron
  • 159
  • 5