Fix: Windows Error 2 Occurred While Loading the Java VM

Regain smooth running of the Java VM

by Matthew Adams
Matthew Adams
Matthew Adams
Windows & Software Expert
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
Reviewed by Alex Serban
Alex Serban
Alex Serban
Windows Server & Networking Expert
After moving away from the corporate work-style, Alex has found rewards in a lifestyle of constant analysis, team coordination and pestering his colleagues. Holding an MCSA Windows Server... read more
Affiliate Disclosure
  • Various factors, including programming errors, incorrect configurations, and hardware issues, can cause this error.
  • Resolving a JVM error typically involves identifying and addressing the root cause of the error, which can require troubleshooting and debugging skills.
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.

You must have found this guide because Windows error 2 occurred while loading the Java VM. This happens to some users when installing software that relies on the Launch Anywhere Java launcher. Consequently, the users can’t install the software when that error message pops up.

That error message started to pop up for users after the release of Java VM version 1.8.0_60. If the Java VM error message sounds familiar, check out some of the causes and fixes we recommend.

What is a Java VM error?

Java Virtual Machine (JVM) error is when the Java Virtual Machine encounters a problem during the execution of a Java program. The JVM runs Java programs and translates the bytecode into machine code that the computer can execute.

Java Virtual Machine (JVM) errors can be caused by a variety of factors, including:

  • Insufficient memory – Java programs require memory to run, and if the JVM does not have enough memory available, it can result in an Out of Memory error.
  • Incompatible Java version – If the Java program is compiled with a more current Java version than the JVM being used, it can cause errors.
  • Incorrect configurations – Incorrect configurations of the JVM, such as specifying an incorrect heap size or garbage collector settings, can cause errors.
  • Operating system issues – Issues with the operating system, such as low disk space, can cause errors.
  • Hardware issues – Hardware issues, such as faulty memory or a failing hard drive, can cause errors.
  • Bugs in the JVM – In rare cases, bugs in the JVM itself can cause errors.

To determine the cause of a JVM error, it is essential to look at the specific error message and any related error logs. This can provide clues as to what is causing the error and help identify the necessary steps to resolve it.

How can I fix Windows Error 2 occurred while loading the Java VM?

  1. Update Java
  2. Delete the Javapath System Variable
  3. Open the Software Installer via the Command Prompt

1. Update Java

  1. Press the Windows key + R, type Control Panel, and hit Enter to open the Control Panel.
    windows error 2 occurred while loading the java vm
  2. Locate and click Java in the Control Panel.
  3. Click the About button to open version details. If an update is required, uninstall the previous Java version first.
    windows error 2 occurred while loading the java vm
  4. To do that, press Windows + R, type appwiz.cpl in Run’s text box, and hit Enter.
    windows error 2 occurred while loading the java vm
  5. Search for Java, select it, and click Uninstall to remove it.
  6. Restart Windows after uninstalling Java.
  7. Open the Java download page and click Download Java for the latest version.
  8. Open the Java setup file to install the latest version.

2. Delete the Javapath System Variable

  1. Open Run by pressing the Windows key + R.
  2. Input systempropertiesadvanced in the open text box, and hit Enter.
  3. Select the Advanced tab.
  4. Press the Environment Variables button.
    windows error 2 occurred while loading the java vm
  5. Select the javapath variable on that window and click the Delete button to erase the javapath variable.

Expert tip:


Some PC issues are hard to tackle, especially when it comes to corrupted repositories or missing Windows files. If you are having troubles fixing an error, your system may be partially broken.
We recommend installing Restoro, a tool that will scan your machine and identify what the fault is.
Click here to download and start repairing.

Some users have stated that they’ve fixed the Windows error 2 error by deleting a Java system variable path. So that’s one of the best resolutions for the Java VM error. Follow the guidelines above to delete the Java system variable path.

3. Open the Software Installer via the Command Prompt

  1. Press the Windows key + X keyboard shortcut, and click Command Prompt (Admin).
  2. Next, enter a LAX_VM command and hit Enter:
    Installer_file.exe LAX_VM C:Program FilesJavajdk1.8.0_60binjava.exe

This is more of a workaround than a fix. Nevertheless, users have confirmed they can open the software’s installer via the Command Prompt. Users can use the steps above to open the Launch Anywhere installer via the Command Prompt.

Note that the LAX_VM command above is an example that users must modify to match their exact installer file names and JDK paths. The syntax for the above Prompt command is:
<installer file name> LAX_VM <full Java (JDK) executable path>

Thus, users will need to edit the installer file name at least. In addition, some users might need to adjust the folder path if they install JDK in a custom directory.

So if you get the Windows error 2 occurred while loading the java VM error, that’s how you may resolve it in Windows.

Let us know if you have found any value in this guide and what solutions have worked for you.

Still having issues? Fix them with this tool:


If the advices above haven't solved your issue, your PC may experience deeper Windows problems. We recommend downloading this PC Repair tool (rated Great on to easily address them. After installation, simply click the Start Scan button and then press on Repair All.

This article covers:Topics: