Fix Windows Error 2 Occurred While Loading the Java VM

The Windows Error 2 occurred while loading the Java VM error usually occurs when a user launches the Launch Anywhere software and other related programs that require a username and password. It usually occurs by a change in the JAVA.exe internal build. In this latest installment of our troubleshooting series we will show you how to fix this particular problem.

If you have any issues with your computer or Android device then feel free to contact us using this form. We will be more than happy to assist you with any concerns that you may have with your device. This is a free service we are offering with no strings attached. We however ask that when you do contact us try to be as detailed as possible so that an accurate assessment can be made and the correct solution can be given.  

Fix Windows Error 2 Occurred While Loading the Java VM

Before performing any of the recommended troubleshooting steps listed below it’s best to restart your computer first. This action refreshes the operating system and remove any corrupt temporary data that could be causing the problem.

Use the latest Java version

This issue usually occurs on older versions of Java so it’s best to make sure that you have the latest version of the software installed.

  • Go to the Java download page https://java.com/en/download/manual.jsp 
  • Download the installer, choose the folder location and save the file to your local system.
  • Double-click on the saved file to start the installation process.
  • Click the Install button to accept the license terms and to continue with the installation.
  • Oracle has partnered with companies that offer various products. The installer may present you with the option to install these programs when you install Java. After ensuring that the desired programs are selected, click the Next button to continue the installation.
  • A few brief dialogs confirm the last steps of the installation process; click Close on the last dialog. This will complete Java installation process.

Check if the Windows Error 2 occurred while loading the Java VM error still occurs.

Launch the installer with the LAX_VM parameter

  • Press Windows key + R to open up a Run command. Type “cmd” and hit Enter to open Command Prompt.
  • Inside Command Prompt, use the “CD” command to navigate to the location of the installer. The default location for browser downloads is C:\Users\*YourUsername*\Downloads.
  • Once you’re in the location of the installer, paste the following command into Command Prompt and press Enter: 

installer.exe LAX_VM “C:\Program Files (x86)\Java\jre6\bin\java.exe”

Check if the Windows Error 2 occurred while loading the Java VM error still occurs.

Delete  javapath from System Environment

  • Press Windows Key + R to open up a Run window. 
  • Type “systempropertiesadvanced” in the Run box and hit Enter to open the Advanced tab of System Properties.
  • In the Advanced tab, click on the Environment Variables… button.
  • If present, select javapath under System variable and click the Delete button. You will be able to identify it via its location C:\ ProgramData \ Oracle \ Java \ javapath.

Check if the Windows Error 2 occurred while loading the Java VM error still occurs.

Add a Path variable to the system

In case the above steps fails to fix the problem then you should perform the steps listed below.

  • Press Windows Key + R to open up a Run window. 
  • Type “systempropertiesadvanced” and hit Enter to open the Advanced tab of System Properties.
  • In the Advanced tab, click on the Environment Variables… button.
  • Next, scroll down to the list of System variables, identify the Path variable and hit the Edit button.
  • In the Edit Environment Variable window, click on New, add the following path and hit Enter:

C:\Program files\Java\jre1.8.0_60\bin

  • Click OK to save the changes, reboot your computer and relaunch the installer again. 

Check if the Windows Error 2 occurred while loading the Java VM error still occurs.

Engage with us

Feel free to send us your questions, suggestions and problems you’ve encountered while using your Android phone. We support every Android device that is available in the market today. And don’t worry, we won’t charge you a single penny for your questions. Contact us using this form. We read every message we receive but can’t guarantee a quick response. If we were able to help you, please help us spread the word by sharing our posts with your friends.

Leave a Comment