How to fix the Java Virtual Machine fatal error in Windows 10

Matthew Adams By: Matthew Adams
2 minute read

Home » Fix » How to fix the Java Virtual Machine fatal error in Windows 10

The Java Virtual Machine fatal exception error pops up for some users when they try to launch software built on Java. 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.

Solutions to Fix Java Virtual Machine Errors

1. Set Up a New System Variable for Java

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 follows.

  • 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 windows.

— RELATED: How to remove the ‘Java Update is Available’ popup

2. Select the Run as Administrator Option for Java

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 follows.

  • 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.

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. Those resolutions usually fix the Java Virtual Machine fatal error so that users can run the required Java software.



Next up

Here’s how to permanently fix Taskhost.exe high CPU usage

John Waibochi avatar. By: John Waibochi
5 minute read

Taskhost.exe is a process that hosts various Windows processes running from a dynamic link library instead of the conventional .exes (executable files). You see, libraries (.dlls) […]

Continue Reading

MsConfig in Windows 8, Windows 10: How to Access it

John Nedelcu By: John Nedelcu
3 minute read

Using the good ol’ msconfig in Windows 10, Windows 8 is very, very simple; read our basic advice to learn how easy it is to […]

Continue Reading

5 best DVD copy protection software to install in 2019

Costea Lestoc By: Costea Lestoc
6 minute read

DVD copy protection is a broad term that covers various methods of copy protection for DVDs. These methods include DRM, CD/DVD-checks, Dummy Files, over-sizing and […]

Continue Reading