How can I specify which Java my installation of Stash should use? I don't want it using my JAVA_HOME. I've tried overwriting my Stash's JAVA_HOME in it's bin/setenv.sh, but that didn't work. Any ideas? Thanks.
In addition to setting the JAVA_HOME environment variable you need to ensure that you set the correct path to the java executable in your PATH.
To check which java executable is used run "which java" or "type java". Make sure you set your PATH environment variable so that the version you want to use comes first.
 λ > which java /usr/bin/java  λ > echo $PATH /Users/ssaasen/.cabal/bin:/Users/ssaasen/.opam/system/bin:/opt/findbugs/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/opt
You could for example define:
export JAVA_HOME=/path/to/java export PATH=$JAVA_HOME/bin:$PATH
to set both the JAVA_HOME and PATH variables correctly.
Thanks for your suggestion. I actually want to have Stash use the same Java as JIRA (the one that comes bundled with JIRA), but I don't want that Java to be the system default. So, I was hoping to avoid setting JAVA_HOME or my PATH variable at all. I figured there has to be a way within Stash's configuration to set which Java to use. Or is it a requirement that Stash use the system JAVA_HOME? Thanks again for your suggestion.
It's officially Tuesday, which means it's officially time for another tip to help you better navigate this space we call the Atlassian Community. 😄 I got a great question from community member, Sa...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs