After installing jdk and setting the environment variables, entering the javac command in cmd cannot be used, prompting "javac is not an internal command or an external command, nor is it an operable program or batch file. ” But entering java -version can display the jdk version number normally, indicating that the java command is available. After I entered Java -home, I found that the path pointed to was completely wrong and the environment variable settings did not work. I don't know why.
Solution:
Run——>cmd
Run the following command in the console to set the java environment variable to solve the problem:
set java_home=C:\Program Files\Java\jdk1.6.0_26 The root directory where JDK is installed
set classpath=%JAVA_HOME%\lib\tools.jar;%JAVA_HOME%\lib\dt.jar;
set path=%JAVA_HOME%\bin;
Note: The input is not case sensitive, and several Java commands are attached
java -help You can view the commands
java -home View JDK installation path
java -version View JDK version
For more java knowledge, please pay attention to the java basic tutorial column.
The above is the detailed content of java is not recognized as an internal or external command solution. 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

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SublimeText3 Linux new version
SublimeText3 Linux latest version

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

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

Dreamweaver Mac version
Visual web development tools

Atom editor mac version download
The most popular open source editor