user3555068
user3555068

Reputation: 67

Eclipse Oxygen can't create virtual machine

Hi I downloaded eclipse oxygen but I can't get it to work. It throws an error ''could not create Java virtual machine''. I tried changing 1024m to 512m and Dosgi.requiredJavaVersion=1.8 to 1.6 but neither worked. ANY help is appreciated. At the time of this comment I was running java 1.7.0.25 but I updated Picture of error file

Upvotes: 0

Views: 1487

Answers (3)

user9727538
user9727538

Reputation: 1

I had the exact same problem. My system initially had Java 7 and Kepler. That always worked. Then I added a new Java (Java 10) and a new Eclipse (i.e. Oxygen). With these two Java versions and two Eclipse versions on my machine. I couldn't invoke either Eclipse. Invoking Oxygen generated the error noted above. Invoking Kepler generated a different error.

So, to make a long story short, Oxygen worked when I deinstalled Java 7 and only had Java 10. Kepler worked when I deinstalled Java 10 and only had Java 7. And neither Eclipse worked when both Javas were installed. Perhaps there's a way to get it to all work when both Javas are installed, but for now, I just uninstalled Java 7 so I can get going with my project using the newer versions of Eclipse and Java.

Upvotes: 0

sruetti
sruetti

Reputation: 533

Eclipse Oxygen recommends (https://www.eclipse.org/downloads/eclipse-packages/?show_instructions=TRUE#page-download) or even requires (https://wiki.eclipse.org/Eclipse/Installation/Java8Required) Java 8.

Please install Java 8 and make sure this is the version used (e.g. remove other versions or run the binary used with the parameter -version).

You may also want to reinstall Eclipse - your eclipse.ini might be corrupt. The line -Dosgi.requiredJavaVersion=1.6-Xms256m in the attached image most likely should be two lines...

You should not have to change parameters like Dosgi.requiredJavaVersion=1.8. Especially lowering the required java version most likely doesn't work - there's a reason why it is required. Giving Eclipse more memory is hardly ever wrong. Giving less memory than in the default setting usually doesn't work too well. If you don't have 1GB of free memory for Eclipse, you should try a less memory hungry IDE...

Upvotes: 1

Auscyber
Auscyber

Reputation: 72

Please do not downvote me for this but it seems you have a problem with java itself because if java could not create a virtual machine it means you do have the wrong java version. Same error was thrown for tomcat, fixed it with different java

Upvotes: 0

Related Questions