JDK and JRE are not in the same version in CMD, Javac is not an internal command

Source: Internet
Author: User

After the installation of the JDK installation is successful, the decompression version is extracted and used in cmd

Java-version

Javac-version

There are two cases

1.java-version is performing normally, but prompting Javac is not an internal command

Both 2.java and Javac can be executed, but the versions are inconsistent.

Reason:

This is because the machine has been installed, the installation version of the JDK, the environment variable path, is the front-to-back read, so the new installation was previously installed covered by the

Workaround:

First: Directly place the configuration of the JDK and JRE in path to the beginning of path. (The symptom is not a cure, not recommended)

The second kind: directly copy the contents of the path, delete the C:programdata\oracle\java\javapath;

Then replace the contents of the path with the remaining content, save it (if there is obsessive-compulsive disorder, you can go to the directory, the contents of the content will be deleted);

JDK and JRE are not in the same version in CMD, Javac is not an internal command

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.