FIX: Failed to create Java virtual machine. (Solved) –

Java is one of the best development tools for creating games and applications and server side programs. Java Virtual Machine environment is required to run games or applications written in Java.

Games or applications developed with Java may crash unexpectedly or fail to open for various reasons, “Could not create Java virtual machine. Error: A fatal exception occurred. The program will exit.”

FIX Failed to create Java virtual machine

Below you will find several ways to solve Java Virtual Machine Launcher error “Could not create Java virtual machine” on Windows 10/11 OS.

How to fix: Failed to create Java virtual machine on Windows 10/11.*

* Offer: Before proceeding with the methods below, try the following and see if the problem persists

    1. Install all Windows updates.
    2. press CTRL + SHIFT + ESC To open the task manager and da Procedures Tab near all cases of Java virtual machine (right click > End Task)

Method 1. Install the correct version of JAVA for your Java IDE application*

*Note: This method is only applicable for users using JAVA IDE for coding.

If you get the error message in JAVA IDE, you need to make sure that the installed Java version is compatible with the Java version (JRE or JDK) running in the Java IDE (Java Integrated Development Environment). So, proceed as follows:

Step 1. Check the version of JAVA IDE running JRE/JDK.

For example, check which version of JRE or JDK you are running by doing the following in the Eclipse IDE:

1. Click from the main menu help me > About Eclipse.
2. click on Installation details and select Configuration Tab.
3. In the “Eclipse IDE Installation Details” window, look for the line that starts with -vm
The value in the following line tells you which JDK or JRE version Eclipse is running.

  • For example: If the path contains “jre6”, it means that Eclipse is running JRE version 6
  • For example: If the path “jdk1.8.0_05Indicates that Eclipse is running on JDK version 8.
Step 2. Check which version of JRE or JDK is installed on Windows.

1. Enter the following in the search field: cmd (or command line). Then choose Run as administrator.


2. To find out the installed JAVA version, issue the following command and click Enter:

View installed java version

3. If your IDE does not support the version of Java on your device, continue to install the correct version of Java. *

*Note: In some cases, the installed JRE and JDK versions may be different. So if you are running a JAVA IDE application JDK, go ahead and also check if the installed JDK is compatible with the running JDK of the JAVA IDE application. To find out the version of JDK installed on Windows, issue the following command:

Method 2. Increasing the memory allocated for JAVA applications.

Running an application that exceeds the maximum memory size of the Java virtual machine may result in a “Could not create Java virtual machine” error. To solve this problem, go ahead and increase the allocated system memory that JAVA can use as follows:

1. click on it Start menu and enter to look for bar: view advanced system settings. Then click It’s open.


2. In the “System Properties” window, select Complicated tab and click Environmental variables.

change java allocated memory

3. Under the System Variables panel, select new.


4. Set the variable name like this _JAVA_OPTIONS and as a variable value -Xmx1024M. Then, click OK twice to save the change and close all open windows. *

* Information: This adjusts the memory allocated for Java to 1 GB (1024 MB).

java memory options

5. Restart your machine to apply the change.
6. Finally, try opening your game or application in the Java Virtual Machine. The problem should go away.

Method 3. Run java.exe with administrator rights.

The Java error also occurs when the user does not have administrator rights or permission to run certain executables. Setting Java to always run as administrator may solve the problem.

1. click on Start menu and type Java in the search field.
2. press Open the file location.


3. In the File Explorer window, right click the Java select and select the executable file Characteristics.

Java features

4. In the Java Properties window, select Compatibility tab and under Settings panel, check the box Run this program as administrator. Then click Please apply and OK.

Java is running as administrator

5. Finally, run the application that is not running because of the “Could not create Java virtual machine” error and see if the problem persists.

Method 4. Completely uninstall and reinstall JAVA.

In some cases, Java may be broken or components are missing, causing the games or applications you’re trying to run to crash. In this case, follow the instructions below to remove all versions of JAVA from your computer and reinstall it.

1. Download the Java Uninstaller.
Run the tool and select remove all Java versions.

Java uninstaller

3. Once removed, proceed and turn off the Java folder(s) from the following locations on the disk (if any):

  • C:\Program Files\
  • C:\Program Files (x86)\

4. Restart your computer.

5. After restarting, visit Java official download page to download and installation Java is the latest version.

download java

That’s it! Which method worked for you?
Let me know if this guide helped you by leaving a comment about your experience. Please like and share this guide to help others.

If you found this article useful, please support us by donating. Even $1 can make a big difference for us We continue to help others while keeping this site free:

Leave a Comment