Summary of the switching problem and solution of installing multiple JDK versions in win10 64-bit system

Summary of the switching problem and solution of installing multiple JDK versions in win10 64-bit system

Since myeclipse2017 and idea2017 are installed on the computer, idea is the latest version, and jdk1.8 or above must be used, while the projects in myeclipse require a lower version of jdk, so jdk1.8 was installed and configured on the computer before, and then jdk1.7 had to be installed. You can switch back and forth, but you encountered many problems in the process. Let me summarize it.

After installing JDK, we configure the environment variables and pay special attention to one issue:

I searched for many solutions to change the environment variables, tried them one by one, and finally solved them. The main solutions are as follows:

1. To switch from jdk1.8 to 1.7, the first thing to do is to change the JAVA_HOME value in the environment variable to the installation path of 1.7, and put JAVA_HOME at the beginning of the Path path. This must be done.

As shown above, reopen cmd, enter multiple directories, and enter the command: java -version to check whether the switch is successful. If it is ok, then it is successful. Otherwise, try the following methods.

2. Find the control panel, select large icons or small icons for viewing mode, find the Java option and click to enter (Note: the Java option is only available after JRE is installed independently).

Then select the Java column, click View, uncheck the enable options for 1.8 and 9, and save. Then reopen cmd, enter multiple directories, and enter the command: java -version to check whether the switch is successful.

Note: This Java Control Panel page is only available after JRE is installed independently. And the following interface will appear only when jre-9 is installed independently:

The display interface of jre1.7 and jre1.8 installed independently is different from the above picture! , as shown below:

Select the Update button, uncheck Automatically check for updates, and do not update automatically. (The following interface will appear only after jre-9 is installed independently)

3. Find the directory C:\Windows\System32 and delete java.exe, javaw.exe, and javaws.exe.

Then reopen cmd, enter multiple directories, and enter the command: java -version to check whether the switch is successful.

4. Find the directory C:\ProgramData\Oracle\Java\javapath (note: it is a hidden directory, you need to turn on the file extension and hidden items, as shown in the figure below), and delete java.exe, javaw.exe, and javaws.exe in the directory.

Note: When we delete all the files in this directory, the environment variable C:\ProgramData\Oracle\Java\javapath under the Path path will automatically disappear. It's amazing! ! !

Then reopen cmd, enter multiple directories, and enter the command: java -version to check whether the switch is successful.

4. If you still cannot switch, you can use WIN + R, enter regedit and press Enter to open the registry, find HKEY_LOCAL_MACHINE-->SOFTWARE-->JavaSoft,

Click Java Development Kit and change the value of CurrentVersion on the right to the version you want (right click --> Change).

Then reopen cmd, enter multiple directories, and enter the command: java -version to check whether the switch is successful.

Summarize

The above is a summary of the switching problems and solutions for installing multiple JDK versions in the win10 64-bit system. I hope it will be helpful to everyone. If you have any questions, please leave me a message and I will reply to you in time!

You may also be interested in:
  • Win10 Java jdk14.0.2 installation and environment variable configuration detailed tutorial
  • The process of JDK installation and configuration of environment variables under WIN10 (detailed version)
  • Win10 system 64-bit jdk1.8 download and installation tutorial diagram
  • JDK13.0.1 installation and environment variable configuration tutorial with pictures and text (Win10 platform as an example)
  • win10 java (jdk installation) environment variable configuration and related issues
  • Detailed installation process of JDK14.0.2 in win10

<<:  Vue opens a new window and implements a graphic example of parameter transfer

>>:  CentOS6.8 uses cmake to install MySQL5.7.18

Recommend

Interactive experience trends that will become mainstream in 2015-2016

The most important interactive design article in ...

How to implement element floating and clear floating with CSS

Basic Introduction to Floating In the standard do...

Example code for implementing dotted border scrolling effect with CSS

We often see a cool effect where the mouse hovers...

Tutorial on using Webpack in JavaScript

Table of contents 0. What is Webpack 1. Use of We...

Detailed explanation of the MySQL MVCC mechanism principle

Table of contents What is MVCC Mysql lock and tra...

Vue custom component implements two-way binding

Scenario: The interaction methods between parent ...

How to remove the blue box that appears when the image is used as a hyperlink

I recently used Dreamweaver to make a product pres...

Specific use of useRef in React

I believe that people who have experience with Re...

Introduction to vim plugin installation under Linux system

Table of contents Install vim plugin manager Add ...

HTML/CSS Basics - Several precautions in HTML code writing (must read)

The warning points in this article have nothing t...

Detailed steps to install MySQL 5.7 via YUM on CentOS7

1. Go to the location where you want to store the...

Web page experience: planning and design

1. Clarify the design direction <br />First,...

WeChat applet canvas implements signature function

In the WeChat applet project, the development mod...