Win7 command window prompts javac not the cause of internal or external commands and solutions

  

Recently, some users have configured the environment variable in Win7 system. When entering the javac command in the command prompt box, a prompt appears: "“‘javac’ is not an internal or external command, nor is it a runnable program or batch. File & rdquo;, what is going on? Don't worry, the following small series will share with you the reason and solution for the Win7 command window prompt "javac is not an internal or external command". Let's go and have a look!

Software Name:
jdk7.0Download (Java SE Development Kit 7) 7u80 Official Win32
Software Size:
143MB
updated:
2015-10-27


one reason: JDK is not installed, installed only jre

jdk1.7.0_60+jre is complete. If jdk is not installed, entering javac in cmd will prompt "“‘javac’ is not an internal or external command, nor a runnable program or batch file" .

Solution: Install jdk.

Reason 2: jdk and jre are installed, but the configuration fails

If jdk is installed, the javac input under normal cmd will be successful, and the following information will be displayed;

So, there is a problem with the environment configuration, we can check the following three places:

First, & rdquo; JAVA_HOME”

The content of JAVA_HOME is the jdk installation directory. Such as the location of the small installation: D: \\ Program Files (x86) \\ Java \\ jdk1.7.0_60, and without a semicolon;

Second, check the CLASSPATH, this is a jar package Call. .;%JAVA_HOME%\\lib\\dt.jar;%JAVA_HOME%\\lib\\tools.jar; (front a little number and semicolon, followed by a semicolon at the end.) Or can be written as “.;%JAVA_HOME%\\lib; ” As shown, the same effect;

Third, check & ldquo; PATH & ldquo; variable is correct

PATH variable is very simple, is the meaning of jdk bin directory. %JAVA_HOME%\\bin;

The above are completed and there will be no problems.

The above content is a small series for everyone to bring about the Win7 command window prompts "javac is not an internal or external command" solution, there are friends who encounter this problem, you can follow the tutorial operation . I hope to help everyone!

Copyright © Windows knowledge All Rights Reserved