I see that to install stash as a service, it requires that JAVA_HOME point to a jdk. I'm installing Stash on a server that already uses the JAVA_HOME (pointing to a jre) variable for other applications. Is there an easy way to make stash look for a different variable?
Many thanks to C.Faysal for prompting the research.
I ended up having to set JAVA_HOME in service.bat and point it to the jdk. The environment variables were left with JAVA_HOME pointing to the JRE.
hi.
try the search function for example :)
https://answers.atlassian.com/questions/137702/how-do-i-configure-stash-to-use-a-specific-java
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the quick response! This article looks like it addresses the setenv file, which Stash ignores when installed as a service.
Is there a way to make Stash use "JAVA_HOME_JDK", for example, instead?
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I just tried using the SET command in the setenv batch file to point to the JDK but it doesn't seem to work. When you say "init script", are you talking about "startup.bat"?
Thanks again for helping out with this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Apologies - should have mentioned - installing on Windows. Would this just need to be set in start-stash.bat?
EDIT: Just noticed that start-stash.bat doesn't reference JAVA_HOME, so my guess was probably incorrect. Although, it does appear that service.bat references a JAVA_HOME and JRE_HOME. Would setting in this file help?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I set the variable in service.bat, ran the bat to install the service, and everything is working great. If you want to post this as an answer, I'll mark it as answered so you can get the points.
Thank you so much for such quick responses. I really appreciate it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Java home environment variable for windows install service (Service.bat) is different for JDK and JRE.
For JRE change environment variable "JAVA_HOME" to "JRE_HOME"
Read Service.bat for details on the difference.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Josh,
Looking at the installation instructions for Tomcat (which Stash uses), you should be able to do:
tomcat7
//US//STASH --JavaHome <path-to-alternate-java-home>
I haven't tested this though.
Cheers,
Michael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, I meant to mention service.bat. It still seemed to ignore setenv.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.