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.exe
、javaw.exe
、javaws.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
How to Find a Java Thread Running on Linux with Ps -Axl
Tomcat Doesn't Stop. How to Debug This
Couldn't Install Netbeans 11.3 with Java 14 Due to Error: "Unsupported Jvm Version"
Why This Javac: File Not Found Error
How to Check If a File Is Open by Another Process (Java/Linux)
Setting/Changing the Ctime or "Change Time" Attribute on a File
Obtaining the Thread Id for Java Threads in Linux
Could Not Reserve Enough Space for Object Heap to Start Jvm
Rjava Install Error "Java_Home Cannot Be Determined from the Registry"
How to Support Both Ipv4 & Ipv6 on Java
Gson: How to Exclude Specific Fields from Serialization Without Annotations
How to Sort Map Values by Key in Java
Platform.Runlater and Task in Javafx
How to Use Swingworker in Java
Split String With Dot as Delimiter