Java javac java-version javac-version

Source: Internet
Author: User
Tags tortoisesvn

Java-version javac-version Version inconsistency

The system first installed the jdk1.8, the environment variable is configured Jdk1.8,java-version and javac-version version of the same.

Then installed the jdk1.7, the environment variable java_home changed to 1.7, but the cmd input java-version and javac-version

Version is not consistent, one is java-version display is 1.8,javac-version is 1.7


It is said that when you run the Java command, you start looking in front of the path, and you will not find it in the back.

Resolve version inconsistency method: Take path

%java_home%\bin;

Put it to the front.

As follows

%java_home%\bin;%systemroot%\system32;%systemroot%;%systemroot%\system32\wbem;%systemroot%\system32\ Windowspowershell\v1.0\;%maven_home%\bin;d:\program Files\tortoisesvn\bin


Probably because my jdk is an. exe installation file, installed. Some information about Java is written in the system. I put%java_home%\bin; Put it in the%SystemRoot%\System32, back, below.


%systemroot%\system32;%java_home%\bin;%systemroot%;%systemroot%\system32\wbem;%systemroot%\system32\ Windowspowershell\v1.0\;%maven_home%\bin;d:\program Files\tortoisesvn\bin

The version is inconsistent.

PS: Change the environment variable, to reopen a cmd window.



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.