-
-
Notifications
You must be signed in to change notification settings - Fork 179
feat: install multiple JDKs with same major version #2271
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
base: main
Are you sure you want to change the base?
Conversation
14d6edb to
9f510d6
Compare
|
Interesting. How's it to be used/managed? Couldn't spot clearly the user impact if any? |
|
The idea is that user impact at first is as close to zero as possible. Mainly to detect if the new system causes any backward compatibility issues. For the user that is accustomed to installing jdks with What does change is how jdks are stored on disk. Before you'd just have a bunch of numbered directories in But now with the new devkitman version you could see this: As you can see I just installed a new version 26. And it gets stored in a directory with a full name (its id) and additionally a symlink was created with the name "26" that points to the actual directory. This symlink serves two purposes: a) is serves as the "default" for that version, so if you have multiple version 26 jdks installed this symlink will point to your "preferred 26 version" and b) it maintains backward compatibility with older JBang versions that will only see the symlinks (older JBang versions ignore directories whose names are not integers). I still have to make a couple of changes before explaining what else has changed. I will keep you posted in follow-up messages here. |
|
gotcha. and i assume its fine but just asking to know if some limits - on windows the symbolic linking also works ? no extra rights needed etc? in past we "survived" these even without extra rights as jsut one folder but i know some stuff improved here i just forget which :) And wouldn't it be nicer if stored per vendor?, i.e. / ? or even to simplify have /installs//? just suggesting this to not mix-n-match too much in one folder directly. whats the signficance of "-jbang" in the name? |
JBang already needs those to work. The default jdk that gets added to your path is a link (a Junction to be precise).
I'm just somewhat following what I see others do. I also think it makes file/folder management slightly more complex to have more levels of directories. Given the fact that nobody should be looking directly at that folder and definitely not depend on its names and structure I feel it's okay to do it this way.
It's because the jdks are managed by the "jbang" provider. There's other providers that can create folders there, for example links to external jdks are handled by the "linked" provider and marked with "-linked". |
4cd7637 to
6decb1a
Compare
Added a flag `--for-version` (or `-v`) to the `jdk default` command to allow setting the default Jdk to use for a specific major version. This is necessary now that we allow multiple Jdks of the same major version to be installed simultaneously.
6decb1a to
db613f3
Compare
Fixes #2118