How To Fix Could Not Create The Java Virtual Machine Minecraft

How To FiX Could Not Create The Java Virtual Machine Minecraft

You are trying to launch your favorite game but it shows “Minecraft could not create the Java Virtual Machine”?

Maybe you are a pro and often when launching the game you face this error and you know how to fix it. But if it is the first time the error encountered, or it just gets fixed whenever you restart the game, but this time, it isn’t, this is the guide you needed the most.

If you think the error is only for Minecraft you are mistaken. It encounters any app or game coded in Java. Minecraft is coded in Java and when you try to open the game, and if it does not download the java to run the game, it will show the error.

The error shows up when java does not use enough MBs from the memory, and to get it fixed more than often, gamers increase the memory size for Java.

This guide will not only cover why this error happens but helps you go through fixing the error without any professional assistance.

Read Also: Internal Exception error

Reasons, why the ‘Minecraft could not create Java Virtual Machine Error, happens?

The specific error is shown when a user launches Minecraft to play the game but the virtual machine due to not downloading the java codes fails to do so. This is when this type of error shows.

Well, the particular prompt that pops up does not suggest any solution though, but we know why it happens. If you are a non-tech-savvy user, you may be will leave the game for another instance.

But if you are tech-savvy and try to fix the issues you face in real life as well as in technological things you will first find out the core reasons.

The core reason is that the Java launcher does not saves enough Megabytes from the memory to launch the Java-coded application, and in the case of Minecraft, it’s our game. When there are not enough Megabytes stored, there won’t be any space left to play the game. Thus, this prompt will show up, making you at least learn the problem to fix it.

Read Also:$annotatedconnectexception error

Solutions “Could not Create the Java Virtual Machine” Error

You can try more than one mentioned method to fix the error. Maybe one or more than one might not work for you, but I am certain if you try all, you will get the issue fixed. It’s because most of the time, we don’t know why this error is even encountered.

Install the right version of Java

The error can also be caused if you don’t have the right version of Java installed for your OS type.

Before uninstalling Java from your OS, check your system and see if it matches the installed java Version or not. If it matches, no need to move forward, if not then, install the right Java version for your OS.

More than often, it has been seen that the users who face this issue had a 64-bit operating system but their Java version was a 32-Bit. This caused the problem we mentioned here and made their system unable to launch Minecraft.

If you too have such an issue, for you, the ideal thing would be to delete all the instances of wrong java files installed on your system before you install the right version of 64-bit or 32-bit.

Related: Minecraft GLFW Error 65542

Administrator Privileges

Maybe the java code you have installed in your system lacks administrator privileges. If it is, then by granting the administrator privileges you can get the issue fixed. To get this done follow me along.

  • Press the ‘Windows+S’ Key on your Keyboard and open the search box
  • Search for Java and right-click on the first result.
  • Then go with the open file location
  • A new tab will be opened with multiple icons, right click on Java.exe and choose its properties
  • Click on its compatibility
  • At the bottom of the Window, you will see ‘Run this program as an Administrator, check this box, and save changes.
  • Close the Windows

Increase the RAM allocation

If I have to tell you the best method, and the method that makes most of the fixes of this error is, increasing the RAM allocation.

By default, the java code does not save enough Megabytes, so when it is a heavy-intensive application, with at least a heap requirement of 256MB, you will face this issue. By allocating the mentioned amount of memory, you can fix the error, follow me along to fix the error.

  • Press Windows + R and type the system.CPL and hit enter.
  • Go to the advanced tab and click environmental variables.
  • You will see a tab, ‘User Variable for Aryal’ and ‘System Variable’, under the System variable click on the New button, and on the variable options gives the variable names _JAVA_OPTIONS and assign that a variable value –Xmx512M and click on Ok.
  • Click on Save and this is how you can easily expand the memory allocation to the application or game you are using Java running for.

Specify the Path

The error we are discussing happens mostly with the users running Windows. You know that Windows uses path variables to point to and enable the executable files.

If the path is not defined correctly, you too might get the issue, ‘Could not create the Java Virtual Machine. So, if you have followed above mentioned methods and none of them worked for you, maybe it’s because you didn’t specify the path of the executable files or where your Java files are stored on your computer.

  • Copy this C:/Program Files\Java and hit enter.
  • You will see more than one Java folder, enter the folder of the Java Development kid you want to use.
  • Go to the JDK folder you want to use and copy the bin file location path in my case it shows like this.
  • C:\Program Files\Java\jdk1.8.0_101\bin
  • This file directory can be different in your case, the point to remember is to copy the file path of Bin.
  • Now again Press windows plus the R key to open the Run and Type system.CPL and hit enter
  • Again go to the advanced tab
  • And click on the environmental variables.
  • Under the system variable double click on the path to edit it and replace it with the path we just copied from the bin folder.
  • Double-click on the Path and click on the new button to paste the path we just copied.

Reinstall Java

If you still are getting the error, even after following through all the methods or solutions we discussed maybe it’s the old java files or corrupted java files behind the error. Maybe the java files you had installed or stored in your system are outdated, and due to compatibility issues, you are getting the error we are discussing.

  • Press Windows Key + I and open Windows settings and go to Apps and apps settings.
  • Search for Java and click on Java you will see to options modify and uninstall, click on uninstall
  • In the same way, click on the Java SE Development Kit and uninstall it too.

Now install the 32-bit or 64-bit Java version compatible with your system. For compatibility with all the Java-based applications, you can even install both 32-bit and 64-bit.

Related: Account Error -9 in Minecraft


Hopefully, this guide will help you clear the error ‘Minecraft could not create the java virtual machine’ even before you have to uninstall and install Java apps.

With your Java files updated with the latest versions, you will not only enjoy playing Minecraft and many other Apps running based on Java files and folders.

Leave a Comment