Home >Java >Javagetting Started >The system cannot find java

The system cannot find java

王林
王林Original
2019-11-19 16:41:592514browse

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

The system cannot find java

Next, right-click on your "Computer", select Properties, open System Properties, and select System Environment Variable Settings

The system cannot find java

First we add a system variable "JAVA_HOME", the value of the path is the directory path of the interface you just copied

The system cannot find java

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 system cannot find java

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.

The system cannot find java

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:what is the error in javaNext article:what is the error in java