Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to solve the problem that javac is not an internal or external command

Shulou Source: shulou.com Published: 2022-06-02 18:35:00 10月03日 Update

Editor to share with you how to solve the problem that javac is not an internal or external command, I believe most people do not know much about it, so share this article for your reference. I hope you will learn a lot after reading this article. Let's learn about it together.

Javac is not a solution for internal or external commands: first check the "JAVA_HOME" configuration; then check the CLASSPATH and modify it; finally, look at the PATH and add "% JAVA_HOME%\ bin".

'JAVAC' is not an internal or external command solution 1

When the JDK running by JAVA is not installed, the execution of JAVAC will report that 'JAVAC' is not an internal or external command. So let's first see if there is a running JDK with JAVA installed on our computer, as shown in the installation directory shown below.

If it is successfully installed and configured, the following correct message appears when executing JAVAC, and if JAVAC is not an internal or external command, nor is it a runnable program or batch file error, please see method 2. This is shown in the following figure.

JAVAC' is not an internal or external command solution 2

After running JAVAC reports that JAVAC is not an internal or external command error, let's run JAVA to see, , running JAVA is correct, there must be something wrong with the configuration of JAVAC. This is shown in the following figure.

First, let's see if our JAVA_HOME configuration is correct. This JAVA_HOME does not match, JAVA_HOME is the jdk installation directory. If you do not match the configuration below, you must write the full path of jdk.

D:\ Java\ jdk is the path where I installed JDK.

Let's see if there is anything wrong with our CLASSPATH. .;% JAVA_HOME%\ lib; is shown in the following figure.

Note: there is a "." The symbol.

Finally, let's see if there is anything wrong with PATH. % JAVA_HOME%\ bin; is shown in the following figure.

Follow my method to check your configuration. If you don't add it yourself, you won't report that JAVAC is not an internal or external command, nor is it a runnable program or batch file error message. This is shown in the following figure.

The above is all the content of this article entitled "how to solve the problem that javac is not an internal or external command". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Command run configuration problem method article error mismatch information content file time directory program path face first come check wrong success Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Redmi Linux OPPO Reno Xiaomi