Skip to content

Java virtual machine launcher error: 3 Fixes

  • by
  • 3 min read

Java is one of the most popular programming languages of all time. It runs on billions of devices in several applications. All because a Java program, once written can be run on any machine that has JVM installed.

However, that doesn’t mean the language and its compiler is free of errors. If you’re getting the Java Virtual Machine launch error, here’s how you can fix the problem.

Also read: Application blocked by Java security error: 2 Fixes


How to fix Java Virtual Machine?

Here are three solutions you can try out to resolve the situation. 

Run the program as administrator

You should first try running the Java program as an administrator. This can be done simply by navigating to the folder where your program is, right-clicking it and selectingย Run as Administrator.ย This should help with any permission issues JVM might be having.


Create a new system variable for Java

Adding a new system variable will let JVM access Java from anywhere in the system and potentially resolve the error. 

Step 1: Press Windows Key + R to open the Run prompt. Type sysdm.cpl and hit enter. 

Java virtual machine launcher error: 3 Fixes

Step 2: Head over to the Advanced tab and click Environment Variables. 

Java virtual machine launcher error: 3 Fixes

Step 3: Click New under System variables. 

Java virtual machine launcher error: 3 Fixes

Step 4: Type _JAVA_OPTIONS in the Variable name field and -Xmx512M in the Variable value field. Click OK when you’re done. 

Java virtual machine launcher error: 3 Fixes

Now restart your PC and try again. JVM should run just fine. 


Reinstall Java

If nothing else works, you will have to remove Java from your PC and reinstall it again to iron out any issues.ย 

Step 1: Press Windows key + X to bring up the quick access menu. Select Apps and Features from this menu.

How to fix Discord Javascript error? | Candid.Technology

Step 2: Find Java in the list, click on it and select Uninstall. 

How to fix Discord Javascript error? | Candid.Technology

Once the uninstaller is complete, you can download Java and reinstall it to fix the problem.

Check out our detailed guide on how to install Java in Windows here

Also read: How to fix โ€˜Internal exception java.net.socketexception connection reset realmsโ€™?

nv-author-image

Yadullah Abidi

Yadullah is a Computer Science graduate who writes/edits/shoots/codes all things cybersecurity, gaming, and tech hardware. When he's not, he streams himself racing virtual cars. He's been writing and reporting on tech and cybersecurity with websites like Candid.Technology and MakeUseOf since 2018. You can contact him here: [email protected]

>