Windows error 2 occured while loading the Java VM

131,716

Solution 1

'Windows error 2' has dozens of meanings (52 that I could find).

The most common one is ERROR_FILE_NOT_FOUND, which can be found in winerror.h. Without more context, that's the best I can guess. Did you check the event logs to see if there's more information there?

Solution 2

Launch the installer with the following command line parameters:

LAX_VM

For example: InstallXYZ.exe LAX_VM "C:\Program Files (x86)\Java\jre6\bin\java.exe"

Solution 3

In cmd

C:\Users\Downloads>install.exe LAX_VM "C:\Program Files\Java\jdk1.8.0_60\bin\java.exe"

Solution 4

For me it works a deleting "C:\ProgramData\Oracle\Java\javapath" in my system enviroment PATH variable

Edit: If you don't have that variable or it does not work you can directly delete or rename the directory "C:\ProgramData\Oracle\Java\javapath"

Solution 5

Try adding C:\path\to\java\jre\bin to your system environment variable PATH and run again. That worked for me!

Share:
131,716
zeroxgames
Author by

zeroxgames

Updated on June 15, 2020

Comments

  • zeroxgames
    zeroxgames about 4 years

    I've been trying to install this ARToolkit from Qualcomm: https://ar.qualcomm.at/qdevnet/ (Windows ".exe" version) on a Windows 7 64bits platform, and I keep getting the error:

    Windows error 2 occured while loading the Java VM

    The program trying to install this program is InstallAnywhere, but I can't seem to find any documentation about this error. The dialogue box name when the crash happens is LaunchAnywhere

    I was just wondering if anyone had seen this kind of error before and if so, how to solve it. The very few answers I can find online relate to Win98/ME issues thus making them irrelevant.

    I'm currently using JDK 1.7.0_04 and jre 1.7 if this is somehow relevant.