When installing java (jdk or jre) in win10, the environment error is reported: Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program wil
环境报错:
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program wil
1. Download the package and install java
Download the jdk package from the official website.
Directly
download the installation at the end of .exe
. In the next step, install-end is selected by default .
Run windows+r and enter cmd
to execute java --version
Error: Could not create the Java Virtual Machine
Error: A fatal exception has occurred. Program wil
2. Solve error reports
1. Right-click My Computer****- Properties - Advanced System Settings-Environment Variables
2. In "User Variables" " New ", enter the variable name: JAVA_HOME
and variable value: C:\Program Files\Java\jdk-11.0.8 (your own JDK installation path)
3. Find the "Path" variable in "User Variables" and click "Edit". **
,4. Click New, create two new variables, and then confirm.
Variable value:
%JAVA_HOME%\bin
%JAVA_HOME%\jre\bin
5. Run "windows+r" on the keyboard and enter cmd
Execute java --version
Then the installation of the java environment is completed.