title: Config for Tika Windows Service with Apache Commons Daemon
body: <p>I'm trying to get Tika JAXRS running as a Windows Service using Apache Commons Daemon.</p>
  
  <p>I've got tika-server-1.7.jar from <a href="http://tika.apache.org/download.html" rel="nofollow">http://tika.apache.org/download.html</a></p>
  
  <p>I've downloaded v1.0.15 of the Windows binaries for Apache Commons Daemon from <a href="http://commons.apache.org/proper/commons-daemon/binaries.html" rel="nofollow">http://commons.apache.org/proper/commons-daemon/binaries.html</a></p>
  
  <p>I can get Tika started as a service, but I can't determine what to use for a stop method.</p>
  
  <pre><code>prunsrv.exe //IS//tika-daemon
   --DisplayName "Tika Daemon" 
   --Classpath "C:\Tika Service\tika-server-1.7.jar"
   --StartClass "org.apache.tika.server.TikaServerCli"
   --StopClass "org.apache.tika.server.TikaServerCli"
   --StartMethod main
   --StopMethod main
   --Description "Tika Daemon Windows Service"
   --StartMode java
   --StopMode java
  </code></pre>
  
  <p>This starts, and works as I'd hope, but when trying to stop the service it doesn't respond. Obviously <code>org.apache.tika.server.TikaServerCli.main(string[] args)</code> isn't a suitable stop method, but I'm lost for alternatives.</p>
  
  <p>I'd also welcome any alternative methods for getting Tika running as a Windows Service, or otherwise auto-starting outside of an interactive session.</p>