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.
Every team in the world is unique, and so Atlassian believes that each and every team's best way of working needs to be molded to their unique circumstances – ...
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
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot