If you are running Tomcat from the command line using catalina.bat (or catalina.sh) then you can set the start up settings in your shell.
set JRE_HOME=C:\Progra~1\Java\jdk1.5.0_14
This works on Windows, it seems that JAVA_HOME is the only system variable tomcat 5.5 is using. The rest come from the start directory?
Using CATALINA_BASE: E:\bin\apache-tomcat-5.5.26
Using CATALINA_HOME: E:\bin\apache-tomcat-5.5.26
Using CATALINA_TMPDIR: E:\bin\apache-tomcat-5.5.26\temp
Using JRE_HOME: C:\Progra~1\Java\jdk1.5.0_14










2 Comments
I use the dos ~1 mechanism in the path name because spaces appear to confuse the set command from the command line…
set JRE_HOME=C:\Progra~1\Java\jdk1.5.0_14
I tried quotations around the string, didn’t appear to prevent the space issue with this particular command.