简体   繁体   中英

Remove default jdk 1.7 version and set 1.6 on windows

I had installed both version of jdk 1.6 and 1.7 and have projects which are developed on version 1.6 . So I need 1.6 . I set path in environmental variable for version 1.6 . But still showing version 1.7 when I used java -version from cmd .

I want to make default version of jdk 1.6 on my computer. I am using windows 7 .

NOTE: I do not want to uninstall 1.7 and I do not have administrative privileges.

Please Help.

While instalation Java exe files are copied to windows System32 folder, Check this location( C:\\Windows\\System32 ) java.exe, javaw.exe and javaws.exe are available there.

What you need to do now is, replace this exe's with jdk 1.6 exe's and open a new command prompt and check the version.

First of all be sure that the java 1.6 home path is put in the beginning of Windows path, because the first met path is used. If you have done that try to start the command prompt NOT as an administrator and check the java version. Strangely I had the same issue and I succeeded to start the java 1.6 version only in a command prompt without administrative privileges.

在PATH开头的PATH变量中添加JavaPath \\ bin。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM