6

I have formatted my Mac due to some storage issues. Before this, I used Eclipse in a proper way. Now i have installed the JDK Screenshot Then, i have installed Java Screenshot

Until now everything seems to be correct but when I open the Eclipse installer... Failed to create the java virtual machine screenshot

What can I do to fix this? I need to work with this the soon as possible.

Thanks

greg-449
  • 109,219
  • 232
  • 102
  • 145
  • look at this question -> [Can't install Eclipse - "Failed to create the Java Virtual Machine" on Mac](https://stackoverflow.com/questions/52652846/cant-install-eclipse-failed-to-create-the-java-virtual-machine-on-mac/56532418) – SwissCodeMen Mar 19 '20 at 22:19
  • Please never post error messages as screenshots only – Marged Mar 19 '20 at 22:37
  • Be sure to set your JAVA_HOME variable since you have installed different versions between the JDK and JRE. – It Grunt Mar 19 '20 at 23:17
  • Eclipse seems to have problems with Java 14 on macOS, it is easiest to use an earlier release of Java. – greg-449 Mar 20 '20 at 07:18
  • 1
    Java 14 problem is Eclipse bug [561273](https://bugs.eclipse.org/bugs/show_bug.cgi?id=561273) – greg-449 Mar 20 '20 at 08:25
  • This issue also happens with adoptopenjdk openjdk11 – masber Apr 01 '20 at 17:08

3 Answers3

7

Eclipse on macOS will not start with Java 14 installed, this is being tracked in Eclipse bug 561273.

Installing Java 8 as well does not help. You need to remove the Java 14 install. You could use the Java 13.0.2 release instead.

Eclipse have determined that the root cause of this issue is a change in Java 14 which is described in this bug report JDK-8238225. The fix for this should be in Java 14.0.1

Update: Eclipse runs fine with Oracle Java 14.0.1 so the issue has been fixed.

greg-449
  • 109,219
  • 232
  • 102
  • 145
  • 1
    You don't necessarily need to uninstall Java 14; you can run the Eclipse executable `/Applications/Eclipse\ Platform.app/Contents/MacOS/eclipse -vm [other jdk]/Contents/Home/lib` to specify another JDK (I locally downloaded 13.0.2). – Jordan Mann Mar 29 '20 at 01:19
  • @Jordan Mann: thank you, that will start my Eclipse machine.And when I insert that into the Info.plist correctly then it starts as well :-) – Coliban Oct 14 '20 at 12:33
1

I also asked this question which was closed, that's why I answer what I have found out: Eclipse will not install on Mac OS Catalina 10.15.4, saying the above error message

Failed to create the Java Virtual Machine.

Deinstalling jdk and install an older one wouldn't help on its own because Eclipse is refusing to install in the first place (as mentioned above). What I have done:

  • i´ve installed an JDK with boost (you can try several, mine worked with Version 13)
  • I edited the installer:
    1. Download the dmg file
    1. convert the dmg-file with "hdiutil convert /dev/disk3s1 -format UDRW -o devimage"
    1. mount the converted dmg-file with: "hdiutil attach -owners on devimage.dmg -shadow"
    1. Edit the /Volumes/Eclipse/Eclipse.app/Contents/Info.plist: there is a section which is commented and there you can try the jdk version. You have to give the full path to the java executable, for example:

<string>-vm</string><string>/Library/Java/JavaVirtualMachines/jdk-13.0.2.jdk/Contents/Home/bin/java</string>
  • Then my eclipse started from the (already) mounted Eclipse image without complaining
Coliban
  • 601
  • 2
  • 9
  • 24
  • Ok, I've found it: I configured, as recommended, the PyDev in "Run->Configuration". But I have to also configure it at the second place: Preferences->PyDev->Interpreters->Python Interpreters. And there the right Python Distribution. The Eclipse 2020-03 is running with openjdk13. You can install the Python tools either with Python (python -m pip ...) or, as I have also done, with "port". – Coliban Apr 22 '20 at 10:01
0

I had the same issue myself a while back. In your Eclipsepedia it provided an example of what the eclipse.ini file looks like when your trying to specify a JVM. So just change the eclipse.ini file and then make sure that you have all of the correct documents in that path to match the example.

  • This is true; however, Eclipse needs to point to a compatible JDK, and Java 14 is not compatible at this time. – Jordan Mann Mar 29 '20 at 01:20
  • @Jordan, i´ve tried /Library/Java/JavaVirtualMachines/openjdk8-openj9, jdk-13.0.2.jdk, jdk-14.jdk, openjdk8, nothing worked. Must have to do with some other configuration, I searched Preferences, looked at the python interpreter, but with no luck – Coliban Apr 20 '20 at 05:32
  • There is something wrong with this distribution on Mac OS. While I have no problems at all on Linux, it is impossible to install Eclipse with Python on Mac OS: I can start it from a mounted Volume, but it doesn't find tkinter. I cannot install or copy it to my local disk or home directory because it then "forgets" his editor and is useless. Don't know, but I am afraid I have to change to Linux. – Coliban Apr 20 '20 at 06:29
  • I resolved it: I configured, as recommended, the PyDev in "Run->Configuration". But I have to also configure it at the second place: Preferences->PyDev->Interpreters->Python Interpreters. And there the right Python Distribution. And Eclipse 2020-03 is running with openjdk13. – Coliban Apr 22 '20 at 09:49