title: Java environment variables under Windows 2012R2
body: <p>We are trying to run Apache-Tomcat which would start / stop as a service. However, when trying to set it up, we get error messages as for unset variables, making it impossible to set it as a service. Looking at the file, and given that this is a .BAT file, as provided by the distribution, is there an easy way to set the JAVA-HOME and other required variables for Java to be set globally for the box ? Our main challenge is to get Apache-Tomcat copied / setup through a script, and the environment variables globally (and permanently) set so that when the server is rebooted, or the service started/stopped/restarted. </p>