-
Notifications
You must be signed in to change notification settings - Fork 366
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 versions --verbose multiple java versions clarification #345
Comments
There is no difference. When you added that JDK, it detected the version as openjdk64-1.8.0.312. To help minimize typing when switching versions, it adds multiple aliases for those. For example, when I added a Zulu 17.0.2 JDK, Jenv created the following aliases:
All four of these links point to the same JDK. I can run If you install a second JDK that would create an alias that already exists, then it will not recreate the alias. For example, if I now add a Zulu 17.0.1 JDK, it will add |
The last comment makes me wonder what happens when a newer version of e.g. 17.x is installed. E.g. you first install Also, when installing through Stuff like this could be added to the root readme, to clarify the default behaviour. |
This commit changes the behavior of `jenv add` and `jenv global|local|shell [version]` Previously, jenv add would add "short" aliases of the version. For example, adding Zulu JDK 11.0.3 would add the following aliases: * 11 * 11.0 * 11.0.3 * zulu64-11.0.3 This was very convenient in that it prevented you from needing to type `jenv version zulu64-11.0.3` to change versions, but led to some confusion among users. See issues jenv#345, jenv#326, jenv#300, jenv#268, etc. It also made `jenv versions` very verbose if you had a lot of versions. This commit addresses this by adding "smart" version detection when running `jenv global|local|shell [version]`, allowing you to run: $ jenv global 11 # Change to JDK 11 $ jenv global 11.0.2 # Change to JDK 11.0.2 $ jenv local zulu # Change to Zulu JDK $ jenv shell x86_64 # Change to x86_64 architecture With all of these commands, `jenv` will attempt to avoid changing the other properties. So if the current global version is a Temurin JDK 11, and you run `jenv global 18`, it will change to a Temurin JDK 18 (assuming you have one installed). If instead you run `jenv global zulu` it will change to a Zulu JDK 11. With this change, `jenv add` no longer adds the short version aliases.
This commit changes the behavior of `jenv add` and `jenv global|local|shell [version]` Previously, jenv add would add "short" aliases of the version. For example, adding Zulu JDK 11.0.3 would add the following aliases: * 11 * 11.0 * 11.0.3 * zulu64-11.0.3 This was very convenient in that it prevented you from needing to type `jenv version zulu64-11.0.3` to change versions, but led to some confusion among users. See issues jenv#345, jenv#326, jenv#300, jenv#268, etc. It also made `jenv versions` very verbose if you had a lot of versions. This commit addresses this by adding "smart" version detection when running `jenv global|local|shell [version]`, allowing you to run: $ jenv global 11 # Change to JDK 11 $ jenv global 11.0.2 # Change to JDK 11.0.2 $ jenv local zulu # Change to Zulu JDK $ jenv shell x86_64 # Change to x86_64 architecture With all of these commands, `jenv` will attempt to avoid changing the other properties. So if the current global version is a Temurin JDK 11, and you run `jenv global 18`, it will change to a Temurin JDK 18 (assuming you have one installed). If instead you run `jenv global zulu` it will change to a Zulu JDK 11. With this change, `jenv add` no longer adds the short version aliases.
This commit changes the behavior of `jenv add` and `jenv global|local|shell [version]` Previously, jenv add would add "short" aliases of the version. For example, adding Zulu JDK 11.0.3 would add the following aliases: * 11 * 11.0 * 11.0.3 * zulu64-11.0.3 This was very convenient in that it prevented you from needing to type `jenv version zulu64-11.0.3` to change versions, but led to some confusion among users. See issues jenv#345, jenv#326, jenv#300, jenv#268, etc. It also made `jenv versions` very verbose if you had a lot of versions. This commit addresses this by adding "smart" version detection when running `jenv global|local|shell [version]`, allowing you to run: $ jenv global 11 # Change to JDK 11 $ jenv global 11.0.2 # Change to JDK 11.0.2 $ jenv local zulu # Change to Zulu JDK $ jenv shell x86_64 # Change to x86_64 architecture With all of these commands, `jenv` will attempt to avoid changing the other properties. So if the current global version is a Temurin JDK 11, and you run `jenv global 18`, it will change to a Temurin JDK 18 (assuming you have one installed). If instead you run `jenv global zulu` it will change to a Zulu JDK 11. With this change, `jenv add` no longer adds the short version aliases.
This commit changes the behavior of `jenv add` and `jenv global|local|shell [version]` Previously, jenv add would add "short" aliases of the version. For example, adding Zulu JDK 11.0.3 would add the following aliases: * 11 * 11.0 * 11.0.3 * zulu64-11.0.3 This was very convenient in that it prevented you from needing to type `jenv version zulu64-11.0.3` to change versions, but led to some confusion among users. See issues jenv#345, jenv#326, jenv#300, jenv#268, etc. It also made `jenv versions` very verbose if you had a lot of versions. This commit addresses this by adding "smart" version detection when running `jenv global|local|shell [version]`, allowing you to run: $ jenv global 11 # Change to JDK 11 $ jenv global 11.0.2 # Change to JDK 11.0.2 $ jenv local zulu # Change to Zulu JDK $ jenv shell x86_64 # Change to x86_64 architecture With all of these commands, `jenv` will attempt to avoid changing the other properties. So if the current global version is a Temurin JDK 11, and you run `jenv global 18`, it will change to a Temurin JDK 18 (assuming you have one installed). If instead you run `jenv global zulu` it will change to a Zulu JDK 11. With this change, `jenv add` no longer adds the short version aliases.
This commit changes the behavior of `jenv add` and `jenv global|local|shell [version]` Previously, jenv add would add "short" aliases of the version. For example, adding Zulu JDK 11.0.3 would add the following aliases: * 11 * 11.0 * 11.0.3 * zulu64-11.0.3 This was very convenient in that it prevented you from needing to type `jenv version zulu64-11.0.3` to change versions, but led to some confusion among users. See issues jenv#345, jenv#326, jenv#300, jenv#268, etc. It also made `jenv versions` very verbose if you had a lot of versions. This commit addresses this by adding "smart" version detection when running `jenv global|local|shell [version]`, allowing you to run: $ jenv global 11 # Change to JDK 11 $ jenv global 11.0.2 # Change to JDK 11.0.2 $ jenv local zulu # Change to Zulu JDK $ jenv shell x86_64 # Change to x86_64 architecture With all of these commands, `jenv` will attempt to avoid changing the other properties. So if the current global version is a Temurin JDK 11, and you run `jenv global 18`, it will change to a Temurin JDK 18 (assuming you have one installed). If instead you run `jenv global zulu` it will change to a Zulu JDK 11. With this change, `jenv add` no longer adds the short version aliases.
This commit changes the behavior of `jenv add` and `jenv global|local|shell [version]` Previously, jenv add would add "short" aliases of the version. For example, adding Zulu JDK 11.0.3 would add the following aliases: * 11 * 11.0 * 11.0.3 * zulu64-11.0.3 This was very convenient in that it prevented you from needing to type `jenv version zulu64-11.0.3` to change versions, but led to some confusion among users. See issues jenv#345, jenv#326, jenv#300, jenv#268, etc. It also made `jenv versions` very verbose if you had a lot of versions. This commit addresses this by adding "smart" version detection when running `jenv global|local|shell [version]`, allowing you to run: $ jenv global 11 # Change to JDK 11 $ jenv global 11.0.2 # Change to JDK 11.0.2 $ jenv local zulu # Change to Zulu JDK $ jenv shell x86_64 # Change to x86_64 architecture With all of these commands, `jenv` will attempt to avoid changing the other properties. So if the current global version is a Temurin JDK 11, and you run `jenv global 18`, it will change to a Temurin JDK 18 (assuming you have one installed). If instead you run `jenv global zulu` it will change to a Zulu JDK 11. With this change, `jenv add` no longer adds the short version aliases. The old aliases still work, but users may want to remove those aliases if they are no longer useful. The aliases take priority over the smart behavior.
This commit changes the behavior of `jenv add` and `jenv global|local|shell [version]` Previously, jenv add would add "short" aliases of the version. For example, adding Zulu JDK 11.0.3 would add the following aliases: * 11 * 11.0 * 11.0.3 * zulu64-11.0.3 This was very convenient in that it prevented you from needing to type `jenv version zulu64-11.0.3` to change versions, but led to some confusion among users. See issues jenv#345, jenv#326, jenv#300, jenv#268, etc. It also made `jenv versions` very verbose if you had a lot of versions. This commit addresses this by adding "smart" version detection when running `jenv global|local|shell [version]`, allowing you to run: $ jenv global 11 # Change to JDK 11 $ jenv global 11.0.2 # Change to JDK 11.0.2 $ jenv local zulu # Change to Zulu JDK $ jenv shell x86_64 # Change to x86_64 architecture With all of these commands, `jenv` will attempt to avoid changing the other properties. So if the current global version is a Temurin JDK 11, and you run `jenv global 18`, it will change to a Temurin JDK 18 (assuming you have one installed). If instead you run `jenv global zulu` it will change to a Zulu JDK 11. With this change, `jenv add` no longer adds the short version aliases. The old aliases still work, but users may want to remove those aliases if they are no longer useful. The aliases take priority over the smart behavior.
I installed java 1.8 by using brew, and then I added it to jenv.
jenv add /Library/Java/JavaVirtualMachines/temurin-8.jdk/Contents/Home/bin
when I run
jenv versions --verbose
I got the following:What is the difference btw
1.8.0.312
andopenjdk64-1.8.0.312
?Sorry if it duplicates another question but I couldn't find anywhere.
The text was updated successfully, but these errors were encountered: