Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"jenv list" not display jdk currently used after "jenv local" and then "jenv use" in a directory #57

Open
longqinsi opened this issue Jul 29, 2023 · 1 comment

Comments

@longqinsi
Copy link

If I specify locally a jdk (i.e. jdk11) in a directory using "jenv local" command and then specify another jdk (i.e. jdk17) for the current session using "jenv use" command, then when I display the jenv environment using "jenv list" command, the output cannot tell me correctly which version of java I'm now using.

[somebody@HOME-PC datahub]# jenv local jdk11
Your replaced your java version for D:\idea_workspace\datahub jdk11
[somebody@HOME-PC datahub]# java --version
openjdk 11.0.20 2023-07-18
OpenJDK Runtime Environment Temurin-11.0.20+8 (build 11.0.20+8)
OpenJDK 64-Bit Server VM Temurin-11.0.20+8 (build 11.0.20+8, mixed mode)
[somebody@HOME-PC datahub]# jenv list
All avaible versions of java

name  path
----  ----
jdk8  D:\ProgramFiles\java\jdk8u382-b05
jdk11 D:\ProgramFiles\java\jdk-11.0.20+8
jdk17 D:\ProgramFiles\java\jdk-17.0.7+7


All locally specified versions

path                      name
----                      ----
D:\idea_workspace\datahub jdk11


[somebody@HOME-PC datahub]# jenv use jdk17
JEnv changed for the current shell session. Careful this overwrites "jenv local"
[somebody@HOME-PC datahub]# jenv list
All avaible versions of java

name  path
----  ----
jdk8  D:\ProgramFiles\java\jdk8u382-b05
jdk11 D:\ProgramFiles\java\jdk-11.0.20+8
jdk17 D:\ProgramFiles\java\jdk-17.0.7+7


All locally specified versions

path                      name
----                      ----
D:\idea_workspace\datahub jdk11
@FelixSelter
Copy link
Owner

Thank you for reporting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants