What should I do if the system cannot find java?
The system cannot find java.exe error. This error is mostly caused by the jdk path configuration problem and the system environment variable configuration in the Windows environment.
First find the jdk directory where you downloaded and installed it. Copy the jdk top-level directory, which will be used later.
Next, right-click on your "Computer", select Properties, open System Properties, and select System Environment Variable Settings.
First we add a system variable "JAVA_HOME", the value of the path is the directory path of the interface you just copied.
Then add the classpath as shown in the figure. This is the basic package path for jre to load the jdk class file when the program is running.
The last step is to add the directory where the jdk bin and other executable files are located to the windows path, so that you can use the command line CMD in any path You can use the command tools in the bin directory of jdk, commonly used javac, java, javadoc, etc.
The above is the detailed content of What should I do if the system cannot find java?. For more information, please follow other related articles on the PHP Chinese website!