简体   繁体   中英

I still see Java 1.8 when I am doing java -version after downgrading to 1.7

I downgraded java 1.7 from 1.8, but I still see 1.8 when I do java -version . I changed the path and also made JAVA_HOME changed for 1.7 as

JAVA_HOME: C:\Program Files (x86)\Java\jdk1.7.0_79 
PATH:      C:\Program Files(x86)\Java\jdk1.7.0_79\bin

For some reason I also have this in my path: C:\\ProgramData\\Oracle\\Java\\javapath , which I believe keeps this 1.8 version. When I take off this from the path, I get this message: C:\\Program Files\\Java\\jre7\\lib\\amd64\\jvm.cfg . I don't know what's going on. Any suggestion would be very helpful.

TRY DOING THE FOLLOWING:

Type "regedit" from startup menu. Take a back up if you are a novice.
Go to
Double click on on the right side of the panel
Change version to


If you have "C:\\ProgramData\\Oracle\\Java\\javapath" in your . 有“C:\\ ProgramData \\ Oracle \\ Java \\ javapath”。 Then open the
location and make sure the java.exe file points to respective 1.7 directory.

If you have "C:\\ProgramData\\Oracle\\Java\\javapath" in your path variable, bring your JAVA_HOME/bin path before it.

Ex: C:\\Program Files(x86)\\Java\\jdk1.7.0_79\\bin;C:\\ProgramData\\Oracle\\Java\\javapath.

I faced the similar issue and was not able to downgrade the java version from 1.8 to 1.7.

close your MS-DOS and open a new MS-DOS window. try again.

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