search
HomeJavaJavaBasejava is not recognized as an internal or external command solution

java is not recognized as an internal or external command solution

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!

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor