Home  >  Article  >  Java  >  javac cannot run after configuring jdk in win10

javac cannot run after configuring jdk in win10

王林
王林Original
2019-11-19 10:37:322204browse

javac cannot run after configuring jdk in win10

An environment variable is an object with a specific name in the operating system, which contains information that will be used by one or more applications. For example, the path environment variable in Windows and DOS operating systems, when the system is asked to run a program without telling it the full path where the program is located, the system should not only search for the program in the current directory, but also go to the path specified in path. . Users can better run processes by setting environment variables.

When configuring jdk environment variables in win10, the most common problems we encounter are as follows.​​​​

java can run, java -version is also OK, but javac cannot run.

This kind of problem is generally caused by incorrect configuration of environment variables in win10.

Solution:

This computer->right-click properties->advanced properties

javac cannot run after configuring jdk in win10

Reconfigure your environment variables OK.

CLASSPATH variable

.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;

JAVA_HOME variable selects the path of the local jdk (the upper directory of bin).

Note:

Path variable, be sure to write the absolute path name, do not write the relative path name, write the bin directory of the local jdk and the bin directory of jre in jdk , this win10 is very good, just write it directly, use different variables to replace one variable, it is awkward to add a semicolon in the middle, add a semicolon in the middle, capitalization, whether there is a semicolon or not can cause the program to fail to run.

javac cannot run after configuring jdk in win10

Recommended tutorial: Getting started with java development

The above is the detailed content of javac cannot run after configuring jdk in win10. 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