Thanks André

cjb> I upgraded Java from 8u181 to 8u191 on our dev (JDK) and test 
cjb> (JRE) Windows 2012 servers today.  After doing so, the Tomcat 
cjb> 8.5(.32) Windows services would no longer start.  Removing and 
cjb> re-adding the service fixed the service.

mt> You need to reconfigure where the service looks for the JRE.
mt> Normally you'd do that with Tomcat[7|8|9]w.exe

cjb> why doesn't the service just use the JAVA_HOME or JRE_HOME
cjb> environment vars?  Is that so there can be multiple services
cjb> running with different versions of Java simultaneously?

aw> Basically yes.  Each service also picks up many other arguments there.
aw> For a complete explanation, I recommend :
aw> https://wiki.apache.org/tomcat/FAQ/Windows#Q11
aw> (disclaimer : I get bonus points each time someone reads that)

I read it, possibly again.  André ++;

Can we put a note in there saying that if a different version of Java is 
installed and the old one is removed, the registry entries are no longer valid 
and need to be refreshed by running Tomcat[#]w.exe to reference the new Java?

<Begin Draft Text>
Note that the JVM location is also stored in the Windows Registry by 
Tomcat[#]w.exe (prunmgr) and is referenced by the service wrapper (prunsrv).  
This means that if the Java location changes, such as removing an older JVM and 
installing a newer version, the Registry entries will no longer be valid, and 
the Tomcat service will no longer run.  Running Tomcat[#]w.exe and updating the 
JVM location on the Java tab or selecting the "Use default" checkbox can remedy 
that.
<End Draft Text>
"One more thing [...]"

Wait a minute.  Could it simply be that the "Use default" checkbox (for JVM) on 
the Java tab was unchecked for me?  Argh.  Cris --;

--
Cris Berneburg
CACI Lead Software Engineer

Reply via email to