What should I do if java is not an internal or external command or an operable program?
'java' is not recognized as an internal or external command, operable program or batch file
Recommended: "Java Learning"
Today I am running the reverse jar, in which the java command is used in cmd.
Configure JAVA environment variables as follows:
1. Download and install jdk
2. After the installation is complete, right-click "My Computer" and click "Properties";
3. Select the "Advanced" tab, Windows 7 selects "Advanced System Settings" on the left, click "Environment Variables";
4. User variable configuration
JAVA_HOME specifies JAVA Installation path, the value is set to: C:\Program Files\Java\jdk1.6.0_43 (the path you just selected during installation may be different for everyone)
5. System variable configuration
Path= .;%JAVA_HOME%\bin; CLASSPATH=.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar (前面的.不要漏掉,表示当前路径)
Solution to the report that running java in CMD is not an internal command (when setting the PATH path, be sure to put .;%JAVA_HOME%\bin; at the front); (note that there is a decimal point, and the previous configuration, the semicolon at the end is in English )
Please give a thumbs up for the solution
Or run it before running the java command
set path=C:\Program Files\Java\jdk1.6.0_43\bin set classpath=C:\Program Files\Java\jdk1.6.0_43\lib\tools.jar;C:\Program Files\Java\jdk1.6.0_43\lib\dt.jar;C:\Java\jdk1.5.0_02\bin
For more programming related content, please pay attention to the Programming Tutorial column on the php Chinese website!
The above is the detailed content of java is not an internal or external command or an operable program.. For more information, please follow other related articles on the PHP Chinese website!