Summary of switching methods after installing multiple versions of JDK

preface

Because I just arrived at the new company and installed jdk1 7 and the development tool MyEclipse 10. However, due to the needs of the company's projects (the specific reasons are not described in detail), MyEclipse 6.5 and JDK1.6 need to be used. Therefore, some small obstacles appear before switching jdk1.7 and JDK1.6. The following description is made so that some junior programmers and themselves can deal with similar problems in the future.

The specific operation and description are as follows

1. Jdk1.0 was originally installed 7. The environment variable is also the 1.7 related path of the configuration. After entering [Java - version] under CMD, it will be displayed

2. Download jdk1 6 and successfully installed. Change the relevant path in the environment variable as follows:

At this time, after entering [Java - version] under CMD, it still displays

It means that the JDK version switching is not successful.

The modification of this method was unsuccessful

3. Find the control panel, select the large icon or small icon for viewing mode, find the Java option and click to enter. Then select the Java bar, click view, and talk about jdk1 7 enable and save:

Enter [Java - version] under CMD to display

The modification of this method was unsuccessful

4. Find the directory C: \ windows \ system32 and put Java exe,javaw. exe,javaws. Exe can be deleted.

When you open a new command line window and execute Java - version, you get the desired result

Modified successfully

Cause: the priority in Windows \ system32 environment variable is higher than Java_ The priority of the environment variable set by home, so if only the environment variable Java is modified_ Home, the JDK version will not be switched.

summary

The above is the whole content of this article. I hope the content of this article can bring some help to your study or work. If you have any questions, you can leave a message.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>