Reputation: 65
I am having problems starting/running 64-bit Tomcat on Server 2008 R2 (64-bit) with 64-bit JRE installed.
What I have installed: (on Server 2008 R2 64-bit)
Tomcat 7.0.35 (64-bit version), unzipped to top level of C:\ so C:\tomcat contains all the Tomcat directories ie bin, conf, lib etc...
jre-7u11 (64-bit version) installed into C:\Program Files by running the exe
What I have done:
set CATALINA_HOME environment (user) variable to C:\tomcat
set JAVA_HOME system variable to C:\Program Files\Java\jre7
What I have tried (didn't work):
setting JRE_HOME system variable to C:\Program Files\Java\jre7
using shorthand for the path ie:
C:\Progra~1\Java\jre7
to get rid of the whitespace
What happens:
On double-clicking the C:\tomcat\bin\startup.bat
file, a cmd window momentarily opens, then immediately closes.
I added PAUSE to the bottom of startup.bat, and the output is as follows:
'Neither the JAVA_HOME nor the JRE_HOME environment variable is defined. At least one of these environment variable is needed to run this program'
My question: Have i not correctly set the JAVA_HOME environment variable? (setting the JRE_HOME environment variable doesn't work either)
also - there is nothing in the tomcat\logs folder
Upvotes: 1
Views: 2531
Reputation: 486
where did you set these variables?
If you defined them in a console prompt, have you tried running c:\tomcat\bin\startup.bat from the same prompt that you set your variables? My guess is that the double clicking starts a new environment which doesn't see the variables set (in another environment)
You can right-click "My Computer" > Properties > Advanced > Environment variables, to add JAVA_HOME to System variables, after this step is done try it again. Changing variables cannot affect running processes and incoming child processes.
Upvotes: 3