Update: Stop getting error messages and slow down your system with our optimization tool. Get it now at this link
The “Windows error 2 when loading Java VM” error usually occurs when the user tries to launch Launch Anywhere software and other programs that require a user name and password to operate. It seems that all programs that cause this problem use the same backend as Launch Anywhere software.
Windows Java Error 2′ has dozens of meanings, something about the 52 you can find on the Internet. The most common is ERROR_FILE_NOT_FOUND which is located in winerror.h.
Causes of this error:
- Java JRE/JDK not installed
- JRE/JDK version 1.8.0_60 or higher installed
Temporarily remove “javapath
The first and easiest solution is to temporarily remove “javapath” from the Windows system variable “PATH”. This prevents the installer from finding a Java virtual machine on the target machine, so it uses version 1.7 of the provided Java virtual machine instead. This can be done in the following way:
Step 1: Start Windows with an account with administrator rights.
Step 2: Open the Windows Control Panel. There are many different ways to do this, depending on whether you are using Windows 7 or Windows 8 and in which mode. In Windows 8, when you move the mouse pointer to the upper right corner, icons appear on the right side of the screen. You can then click on the Search button (a magnifying glass), make sure that the applications are selected, type the control panel into the text box, and then click on the Control Panel icon displayed. In Windows 7, click on the lower left corner of the screen, then type the control panel in the text box labeled Search Programs and Files.
Step 3: In the Control Panel, select System and Security, then System. Then click on Advanced System Settings on the left side of the dialog box to open the System Properties dialog box, with the Advanced tab selected. Click on the Environment Variables… button at the bottom right of this dialog box.
Step 4: In the lower part of the dialog box is a table called System variables. Move the cursor down until you see the path in the Variable column. Click on this line to select it, then click on the button under the table entitled Modify. A small dialog box will appear with the title Edit System Variable.
Step 5: Left-click in the Variable Value text field and drag it to the left until you reach the first entry in the path. The entries are separated by a semicolon. Select the entry carefully: C:\ProgramData\Oracle\Java\javapath; to make sure you have the semicolon at the end. This is often the first entry, but it can happen anywhere in the path. After selecting and selecting, click on the Delete button on your keyboard to delete this entry from the path.
Note: The Windows C:\ProgramData folder is hidden by default. When you open drive C to view files with the Explorer, click View at the top and check the Hidden Items box to make the ProgramData folder visible. The C:\ProgramData\Oracle\Java\javapath folder contains symbolic links to executable Java files. You can right-click on it and select Properties to see which executables it refers to.
Step 6: Click the OK button in the Edit System Variable dialog box, click OK in the Environment Variables dialog box, and then click OK in the System Properties dialog box.
Check that your Java version is up to date. If not, update Java to the latest version. This allows users to update Java under Windows.
- Users can check their Java versions using the Java control panel. To open it, press Windows + Hotkey R.
- Under Run, type “Control Panel” and click on the OK button.
- Then click on Java in the Control Panel to open the window below.
- Click on the About button to open the version details. If an update is required, first uninstall the previous Java version.
Start the installation program with the parameter LAX_VM.
This method is generally considered to be the best solution to this type of problem. You can avoid the “Windows error 2 error when loading the Java VM” error by starting the installation program at the command prompt with the LAX_VM parameter.
RECOMMENDED: Click here to troubleshoot Windows errors and optimize system performance
CCNA, Web Developer, PC Troubleshooter
I am a computer enthusiast and a practicing IT Professional. I have years of experience behind me in computer programming, hardware troubleshooting and repair. I specialise in Web Development and Database Design. I also have a CCNA certification for Network Design and Troubleshooting.