Java virtual machine launcher error could not create the java virtual machine

by Matthew Adams

Matthew is a freelancer who has produced a variety of articles on various topics related to technology. His main focus is the Windows OS and all the things... read more

Updated on February 22, 2022

  • Many users describe encountering the same Could not create the Java virtual machine error when launching an application.
  • Try setting up a new system variable for Java, to see if it makes any difference. 
  • You should also run the software as an administrator as the lack of rights can trigger the error.
  • If you're still experiencing this problem, it all comes to reinstalling the solution from scratch.

Java virtual machine launcher error could not create the java virtual machine

XINSTALL BY CLICKING THE DOWNLOAD FILE

To fix various PC problems, we recommend Restoro PC Repair Tool:
This software will repair common computer errors, protect you from file loss, malware, hardware failure and optimize your PC for maximum performance. Fix PC issues and remove viruses now in 3 easy steps:

  1. Download Restoro PC Repair Tool that comes with Patented Technologies (patent available here).
  2. Click Start Scan to find Windows issues that could be causing PC problems.
  3. Click Repair All to fix issues affecting your computer's security and performance
  • Restoro has been downloaded by 0 readers this month.

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 can I fix the Java virtual machine error?

1. Set up a new system variable for Java

  1. Open Run with the Windows key + R keyboard shortcut.
  2. Enter sysdm.cpl in Run and click OK to open the window in the image directly below.
    Java virtual machine launcher error could not create the java virtual machine
  3. Select the Advanced tab on that window.
  4. Click the Environment Variables button to open the window below.
    Java virtual machine launcher error could not create the java virtual machine
  5. Click the New button under the System variables box.
  6. Enter _JAVA_OPTIONS in the Variable name text box.
    Java virtual machine launcher error could not create the java virtual machine
  7. Then, enter –Xmx512M in the Variable value text box, which increases RAM allocation to 512 megabytes.
    Java virtual machine launcher error could not create the java virtual machine
  8. Click the OK button to close the window.
  9. 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

  1. Open Cortana with the Windows key + S keyboard shortcut.
  2. Enter Java in the search box.
  3. Then right-click Java and select Open file location to open Java’s folder in File Explorer.
  4. Now users can right-click the java.exe and select Properties.
    Java virtual machine launcher error could not create the java virtual machine
  5. Select the Compatibility tab.
    Java virtual machine launcher error could not create the java virtual machine
  6. Select the Run this program as an administrator option.
  7. Select the Apply option.
  8. 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

  1. 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.
    Java virtual machine launcher error could not create the java virtual machine
  2. Enter Java in the search box.
  3. Select Java and click Uninstall.
  4. Click Yes on any confirmation window that opens.
  5. Thereafter, restart Windows.
  6. Then open the Java download page in a browser.
    Java virtual machine launcher error could not create the java virtual machine
  7. 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.
  8. Thereafter, open the Java setup wizard.
  9. Click the Install button on the setup wizard.

Java virtual machine launcher error could not create the java virtual machine

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.
Read more about this topic

  • How to fix Windows error 2 while loading the Java VM
  • Fit the Runtime error Java in just a few easy steps
  • How to download Java 10 on your Windows PC

Use a Java virtual machine online

If you can’t use the Java virtual machine on your PC, you can compile your code straight online.

Java virtual machine launcher error could not create the java virtual machine

For instance, a website like Online Java has a very simple interface and the app allows you to compile, run and save your programs very easily without the need for an installation.

Moreover, you also have the option of sharing your code with friends or colleagues who can also make comments on your work and help you.

If you have any other questions or if you have advice for other users to try, don’t hesitate to leave a comment below.

Java virtual machine launcher error could not create the java virtual machine
Still having issues? Fix them with this tool:

  1. Download this PC Repair Tool rated Great on TrustPilot.com (download starts on this page).
  2. Click Start Scan to find Windows issues that could be causing PC problems.
  3. Click Repair All to fix issues with Patented Technologies (Exclusive Discount for our readers).

Restoro has been downloaded by 0 readers this month.

Frequently Asked Questions

  • What is JVM in simple words?

    In plain language, JVM is a virtual machine that enables a computer to run Java programs.

  • How do you fix JVM could not be started?

    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.

  • What is a virtual machine error in Java?

    Getting a virtual machine error is a sign of insufficient admin rights or that Java needs a larger global maximum heap memory size.

Java virtual machine launcher error could not create the java virtual machine

Newsletter