ystyle / jvms

JDK Version Manager (JVMS) for Windows

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Switch from 1.8 to 11 failed, the display is successful, but the java-version is still 1.8, are locally installed JDK, copy into store

V1rtu0l opened this issue · comments

I did not reproduce the problem, You can see if the target pointed to by C:\Program Files\jdk has changed

2022-06-24_10-37

Hello,
I had the same issue.

Repro steps:

  • installed jvms in "c:/Program Files/jvms"
  • installed a Java version from jvms releases so that "c:/Program Files/jvms/store" folder gets created
  • created a new folder "c:/Program Files/jvms/store/8u121"
  • downloaded oracle Java version 8u121 and installed it directly in "c:/Program Files/jvms/store/8u121/"

That is when I got the same error as described in above comments.
Running terminal as administrator and playing with jvms commands seem to work just fine. But when I run java -version I always got the one specific version.

Solution:

Open windows environment variables, go to system "Path" variable and make sure that
"C:/Program Files (x86)/jdk/bin
"C:/Program Files/jvms
are listed before any other entry that has to do with java (oracle Java installer created its own entries for java here and listed them on top of the Path list)

I hope this helps and works also for you.