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

CSS3 realizes the website product display effect diagram

This article introduces the effect of website pro...

Basic knowledge of MySQL learning notes

View Database show databases; Create a database c...

Vue Element-ui implements tree control node adding icon detailed explanation

Table of contents 1. Rendering 2. Bind data and a...

5 ways to migrate Docker containers to other servers

Migration is unavoidable in many cases. Hardware ...

Docker-compose quickly builds steps for Docker private warehouse

Create docker-compose.yml and fill in the followi...

CSS3 realizes the mask barrage function

Recently I saw a barrage effect on B station call...

Vue implements form data validation example code

Add rules to the el-form form: Define rules in da...

Basic application methods of javascript embedded and external links

Table of contents Basic application of javascript...

The most comprehensive explanation of the locking mechanism in MySQL

Table of contents Preface Global Lock Full databa...

Solution to forgetting the MYSQL database password under MAC

Quick solution for forgetting MYSQL database pass...

vmware virtual machine ubuntu18.04 installation tutorial

Installation Steps 1. Create a virtual machine 2....

How to bind Docker container to external IP and port

Docker allows network services to be provided by ...