- Many users describe encountering the same Could not create the Java virtual machine error when launching an application.
- Before reinstalling Java, you can try setting up a new system variable for Java, to see if it makes any difference.
- Even if this issue is reported to occur with Minecraft, things are no different when trying to use other apps that are built around Java.
- For more quick fixes as the ones here detailed, visit our Tech Troubleshooting Hub.
The Java virtual machine fatal exception error pops up for some users when they try to launch software built on Java. Minecraft users are no stranger to this issue.
The full error message states: Could not create the Java Virtual Machine. Error: A fatal exception has occurred.
Consequently, the Java program doesn’t run. These are a few potential fixes for the Java Virtual Machine fatal error.
How to fix Java virtual machine error?
1. Set up a new system variable for Java
- Open Run with the Windows key + R keyboard shortcut.
- Enter sysdm.cpl in Run and click OK to open the window in the image directly below.
- Select the Advanced tab on that window.
- Click the Environment Variables button to open the window below.
- Click the New button under the System variables box.
- Enter _JAVA_OPTIONS in the Variable name text box.
- Then, enter –Xmx512M in the Variable value text box, which increases RAM allocation to 512 megabytes.
- Click the OK button to close the window.
- Then press the OK button on the Environmental window.
The Java Virtual Machine error often arises when Java needs a larger global maximum heap memory size.
Users have fixed the issue by expanding the maximum RAM allocated to Java. Users can do that by establishing a new Java System Variable as described above.
2. Select the Run as Administrator option for Java
- Open Cortana with the Windows key + Q keyboard shortcut.
- Enter Java in the search box.
- Then right-click Java and select Open file location to open Java’s folder in File Explorer.
- Now users can right-click the java.exe and select Properties.
- Select the Compatibility tab.
- Select the Run this program as an administrator option.
- Select the Apply option.
- Click OK to close the window.
The Java virtual machine error can also be due to insufficient admin rights. Thus, some users might need to assign admin rights to Java.
Users can assign admin rights to Java in Windows 10 as described above.
3. Reinstall Java
- Reinstalling Java might also fix the Java virtual machine error for some users. First, uninstall the currently installed Java version by entering appwiz.cpl in Run and clicking OK.
- Enter Java in the search box.
- Select Java and click Uninstall.
- Click Yes on any confirmation window that opens.
- Thereafter, restart Windows.
- Then open the Java download page in a browser.
- Users need 32-bit Java for 32-bit programs and 64-bit Java for 64-bit software. If in doubt, your best bet is to download and install both Java versions by clicking Windows Offline and Windows Offline 64-bit.
- Thereafter, open the Java setup wizard.
- Click the Install button on the setup wizard.
So, that’s how users can fix the Java virtual machine fatal error and get back to running the required Java software.
Any of the previously mentioned solutions may be successfully applied in these scenarios:
- Java virtual machine launcher error – This issue arises even if nothing has changed on your computer and it’s most likely related to Java installation.
- Could not create the Java virtual machine a fatal exception has occurred – This problem also seems to appear randomly. Make sure you aren’t using a 32-bit VM and a 64-bit Eclipse.
- Minecraft could not create the Java virtual machine – This error shows up when trying to launch Minecraft. The main reason is that it needs admin access in order to function properly.
Frequently Asked Questions
In plain language, JVM is a virtual machine that enables a computer to run Java programs.
To fix the annoying Java virtual machine error, you may try to start in 64-bit mode or use the steps described in this detailed guide.
Getting a virtual machine error is a sign of insufficient admin rights or that Java needs a larger global maximum heap memory size.