Could Not Create the Java Virtual MAChine

Eclipse error: 'Failed to create the Java Virtual Machine'

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


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

Can't open Eclipse anymore - Could not create the Java Virtual Machine

As suggested in the comment section, installing a new version of Eclipse (Photon, 2022-06 or more) solved the problem.

How I solve this - Error: Could not create the Java Virtual Machine

Solutions:1.Check the Java environment

2.Some programs have memory setting and some memory setting is set beyond VM range.

3.Check if java.exejavaw.exejavaws.exe are generated under C:\Windows\System32,just delete them.

4.Displays the definition parameters in the environment variables to set the VM size.
Global environment variable name: _JAVA_OPTIONS

value:-Xmx512m

SonarQube: Error: Could not create the Java Virtual Machine

Your problem most likely occurs due to the fact that you are attempting to run SonarQube with an unsupported Java version.

From the error log, I presume that you are attempting to run it using either Java 14 or Java 15 based on these lines:

Picked up _JAVA_OPTIONS: -Xmx1024M
Unrecognized VM option 'UseConcMarkSweepGC'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

The CMS collector was deprecated in Java 9 and removed altogether in Java 14:

https://openjdk.java.net/jeps/363

This means that the batch script that attempts to start Sonar is passing in some JVM args that are no longer valid.

Based on their documentation that only supported Java version are 8 and 11

https://docs.sonarqube.org/latest/requirements/requirements/

and version above those are not supported:

SonarQube scanners require version 8 or 11 of the JVM and the
SonarQube server requires version 11. Versions beyond Java 11 are not
officially supported.

I suggest you attempt to run it using the correct Java version. Also please check the related documentation beforehand to avoid such issues.

Spring Tool can't create the java virtual machine

The error message isn't really explaining in detail what the problem is, but I would recommend to things here:

  • update to a recent JDK 1.8.0 (I think it is at 1.8.0_181 at the moment) and use that.
  • you can also specify the JVM to run STS in the STS.ini file in the same way than you could do that for plain Eclipse in the eclipse.ini file (described in more detail here: https://wiki.eclipse.org/Eclipse.ini).

It also looks like you are running a 64bit operating system, so in case you have a 64bit JDK installed, you should make sure to download and use the 64bit version of STS. From the error dialog it looks like you are trying to use the 32bit version of STS. You can do that, if you want to, but you would need to make sure that it picks up a 32bit JDK then. But I would strongly recommend to use a 64bit JDK together with the 64bit version of STS.



Related Topics



Leave a reply



Submit