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
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.
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!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Zend Studio 13.0.1
Powerful PHP integrated development environment

Atom editor mac version download
The most popular open source editor

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SublimeText3 Mac version
God-level code editing software (SublimeText3)
