jabba icon indicating copy to clipboard operation
jabba copied to clipboard

Jabba installed through homebrew not working

Open eliasbagley opened this issue 7 years ago • 13 comments

running the command sequence:

brew install jabba
jabba install [email protected]
jabba use [email protected]
echo $JAVA_HOME

results in the $JAVA_HOME environment variable not being set.

Also running jabba current doesn't return anything either.

[email protected] is listed as being installed when I run jabba ls

I can confirm these same command work as expected when installed through the curl script.

Jabba version 0.9.2 OSX High Sierra

eliasbagley avatar Jan 23 '18 17:01 eliasbagley

Hi Elias.

Interesting. I wasn't aware that is available through Homebrew :) From what I can tell https://github.com/Homebrew/homebrew-core/blob/master/Formula/jabba.rb is missing shell integration scripts (e.g. https://github.com/shyiko/jabba/blob/master/install.sh#L91). Without them none of the jabba commands will have any effect on the shell environment.

shyiko avatar Jan 23 '18 23:01 shyiko

What's the best way to fix this? I like all my packages coming in through brew.

satyanash avatar Jun 07 '18 08:06 satyanash

I'll update homebrew formula to include shell integration as soon as 1.0.0 is out (it's near completion).

shyiko avatar Jun 07 '18 18:06 shyiko

Awaiting with baited breath!

fuzzyweapon avatar Jun 11 '18 18:06 fuzzyweapon

Has this been fixed? I am using linuxbrew and ubuntu 18.04 and I am facing the same issue. Thank you.

thiagolocatelli avatar Aug 12 '18 04:08 thiagolocatelli

Neither is JAVA_HOME set, nor are the jabba-active java/javac in PATH.

mcandre avatar Nov 30 '18 18:11 mcandre

Error still exists. Will this be fixed or do we have to switch to not-brew installed jabba?

nimble-123 avatar Apr 03 '19 11:04 nimble-123

It still doesn't work. I had to uninstall jabba with brew uninstall jabba and then I ran the curl command on the README.md file and it worked.

GargantulaKon avatar Jun 04 '19 15:06 GargantulaKon

It still doesn't work. I had to uninstall jabba with brew uninstall jabba and then I ran the curl command on the README.md file and it worked.

Thanks! That worked for me as well!

At this moment, this is the curl command, to save time of the next one running into that issue:

curl -sL https://github.com/shyiko/jabba/raw/master/install.sh | bash && . ~/.jabba/jabba.sh

vitor251093 avatar Mar 10 '20 14:03 vitor251093

Wow, this opened issue in 2018 is still relevant.. jabba installed by brew didn't work for me, so I had to install it via curl. Are there any estimations when it will be fixed? Can we somehow help with it?

fabasoad avatar Mar 25 '21 01:03 fabasoad

Lol, after 4 years, still doesn't work

@shyiko any updates?

LukeSamkharadze avatar Mar 12 '22 18:03 LukeSamkharadze

Also on my Mac I'm getting the same issue, via homebrew the dependency seems to not working correcly and update the JAVA_HOME variable. So I needed to change it "by hands".

Is there any planning fix about this?

albertoadami avatar Nov 08 '22 09:11 albertoadami

The https://formulae.brew.sh/formula/jabba instruction page says that you need to add this to your .zshrc:

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

However, that's wrong, at least on the Mac. Instead, this works:

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

wkeese avatar Aug 11 '24 01:08 wkeese