Jabba-Team / jabba

(cross-platform) Java Version Manager
Apache License 2.0
141 stars 11 forks source link

`use` has no effect when jabba installed via homebrew #46

Open wimdavies opened 3 months ago

wimdavies commented 3 months ago

Similar situation to #37. I originally installed jabba via homebrew. I could successfully jabba install multiple java versions, but jabba use had no effect on JAVA_HOME and the output of jabba current was nothing.

After running brew uninstall jabba and re-installing Jabba directly via curl, jabba use now successfully sets an installed java version.

patrick-mccourt commented 3 months ago

Hi @wimdavies can I just check, is this homebrew on Mac OS? If so which version of MacOS

wimdavies commented 2 months ago

Hi @wimdavies can I just check, is this homebrew on Mac OS? If so which version of MacOS

Sorry for neglecting to include this information. Yes, this is homebrew on macOS, Sonoma 14.6.1.

patrick-mccourt commented 2 months ago

Still need some time to look into this better, just out of curiosity, could you try this older version:

brew install jabba@0.12.1

and let me know if it works

Edit: Ignore this actually, 0.12.1 wasn't available on homebrew

patrick-mccourt commented 1 month ago

Hi @wimdavies, the homebrew installer works differently to the install script, and so misses some of shell integration steps the script does, can you try adding:

[ -s "$HOMEBREW_PREFIX/opt/jabba/jabba.sh" ] && . "$HOMEBREW_PREFIX/opt/jabba/jabba.sh"

to your .zshrc on Mac (assuming you've not changed your shell from the default zsh)