Home >Java >Javagetting Started >The system cannot find java
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 put the jdk bin etc. The directory where the executable file is located is added to the Windows path, so that in any path using the command line CMD, you can use the command tools in the bin directory of jdk. Commonly used javac, java, javadoc, etc.
Recommended tutorial: java introductory tutorial
The above is the detailed content of The system cannot find java. For more information, please follow other related articles on the PHP Chinese website!