JDK switching in Java (no need to uninstall the original JDK)

Source: Internet
Author: User

The transfer from: http://blog.csdn.net/u010011371/article/details/50749954

Very good piece of article, suitable for my this small white, convenient later use.

have been using the JDK1.8 version, now to replace the JDK1.7! See a lot of online do not know how to switch. So write it up for everyone to share!

I now have JDK1.7 and JDK1.8 installed on my computer. The next step is to configure the environment variables!

Path configuration
%java_home%\bin;%java_home%\jre\bin;


Java_home Configuration
C:\Program files\java\jdk1.8.0_66


Classpath configuration
.; %java_home%\lib;%java_home%\lib\tools.jar


Java commands
Java-version

Results:

To switch to JDK1.4 below, only the environment variable is required.

Change the JDK version mode: (example 1.4) Step one: Write the java_home variable to the current JDK1.7 path. C:\Program files\java\jdk1.4.2 Step Two: Write JDK1.4 in the path variable to the bin path, (written in front)------> actually here I tried, the request is not very strict, you can test your own C : \program Files\java\jre\bin (This is your own installation of the JRE location, full path OH.) It can be added directly to the path variable before it can be used. Pro-Test effective)

That way, we're going to switch the JDK! You don't have to uninstall the original JDK. If you want to change back to the original JDK, just remove the JDK configuration!

JDK switching in Java (no need to uninstall the original JDK)

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.