Solution:
1. The downloaded JDK environment must correspond to your own operating system. Download the 32-bit Windows JDK environment for 32-bit operating systems, and download the 64-bit Windows JDK environment for 64-bit operating systems.
2. When installing the JDK environment, there will be two path selections, which can be left unchanged by default. If you customize the path, the path of the previous JDK and the path of the next JRE cannot be in the same subdirectory, because The JDK environment contains another JRE file to avoid conflicts. The JRE installation path cannot be selected under the JDK file path.
Recommended tutorial:java quick start
The above is the detailed content of Reasons and solutions for Java installation failure. For more information, please follow other related articles on the PHP Chinese website!