"Javac is not an internal or external command" issue encountered while installing the configuration Android environment

Source: Internet
Author: User

Today on a new machine, configure the Android environment. System for Win7 flagship 64-bit, downloaded the JAVA8 installation package "Jdk-8u40-windows-x64.exe", installed on the D-disk:

When the installation is complete, right-click on the desktop to open the Command line window, enter "Java-version", "java" command no problem:

Enter the "Javac" command to indicate that "javac is not an internal or external command and is not a running program":

This is not the reason to add the Java installation path in the system variable, the configuration system variable steps are as follows:

First create a new variable in the system variable column, variable name:java_home, variable value:D:\Program files\java\jdk1.8.0_40

Add a system variable, variable name:CLASSPATH, variable value:.; %java_home%\dt.jar;%java_home%\tools.jar (There is a point in front)

Select the variable path to edit, add to the variable value:;%java_home%\bin (if the variable value is empty, do not add a semicolon)

Save the settings, enter "Javac" in the cmd Command Line window, and still prompt the error "Javac is not an internal or external command, nor is it a running program". Many netizens encounter the same problem, there are various statements on the Internet: to install to the C drive, installation path can not have spaces and so on. In fact, these are not problems, I installed on the D drive, and the installation path has spaces.


The above operation is actually no problem, the only thing to do is to close the command window, reopen, enter "Javac", you can see that the correct prompt has occurred:

"Javac is not an internal or external command" issue encountered while installing the configuration Android environment

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.