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.
Hi Mickey,
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.
[4847] λ > which java /usr/bin/java [4838] λ > 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.
HTH.
Cheers,
Stefan
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm thinking the only mechanism for specifying which Java to use for Stash is by specifying it in either JAVA_HOME or PATH. Does that sound correct? Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
you should be able to define
export JAVA_HOME=/path/to/java export PATH=$JAVA_HOME/bin:$PATH
in bin/setenv.sh so it is local to your Stash installation.
You don't have to apply this setting to your user global environment.
HTH.
Cheers,
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.