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.
This question is related to
java
windows
installation
installanywhere
I think it should be .....\javaw.exe"
. It worked for me. Thanks.
If you get the error after installation: Find the .lax file with the matching exe name and update current vm path from:
lax.nl.current.vm=C:\ProgramData\Oracle\Java\javapath\java.exe
to
lax.nl.current.vm=C:\Program Files\Java\jre1.8.0_144\bin\java.exe
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"
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"
I had same mistake, it was produced because i had disabled the creation of "_jvm" in the InstallAnywhere (project - JVM settings - Installer Settings - Bundled/Downloaded Virtual Machine), then into file "Uninstall $PRODUCT_NAME$.lax" into uninstall folder, the variable "lax.nl.current.vm" is empty.
If you don't need jvm is disabled check "Install Bundled / Downloaded Virtual Machine" option in the checkbox (project - JVM settings - Installer Settings - Bundled/Downloaded Virtual Machine).
If you need jvm is disabled because you create it manually, then you can do the following: create an action "Modify Text File" to append variable with the value of the _jvm folder.
(Existing File)
$USER_INSTALL_DIR$\Uninstall_$PRODUCT_NAME$ \Uninstall $PRODUCT_NAME$.lax
(Append)
lax.nl.current.vm=..\_jvm\bin\java.exe
In cmd
C:\Users\Downloads>install.exe LAX_VM "C:\Program Files\Java\jdk1.8.0_60\bin\java.exe"
Try adding C:\path\to\java\jre\bin
to your system environment variable PATH and run again. That worked for me!
I got the same problem after upgrading java from 1.8.0_202 to 1.8.0_211
Problem:
Here are directories where new version of 1.8.0_211 of Java installed:
Directory of c:\Program Files\Java\jre1.8.0_211\bin Directory of c:\Program Files (x86)\Common Files\Oracle\Java\javapath
So one is located in 32 bit and second is in 64 bit Program files folder. The one that is specified in the PATH is 32 bit version (c:\Program Files (x86)\Common Files\Oracle\Java\javapath), even though it was 64 bit version of the Java that was installed.
Solution:
Change system environments variable PATH from c:\Program Files (x86)\Common Files\Oracle\Java\javapath to c:\Program Files\Java\jre1.8.0_211\bin
We could not uninstall a program, stuck with the "Windows error 2 cannot load Java VM". Added the Java path to the PATH variable, uninstalled and re-installed Java 8, the problem would not go away.
Then I found this solution online and it worked for us on the first shot: - Uninstall Java 8 - Install Java 6
Whatever the reason, with Java 6, the error went away, we uninstalled the program, and re-installed Java 8.
Source: Stackoverflow.com