title: Error in starting java application as windows services
body: <p>I have downloaded commom-daemon tool and used with a java application. I have created a bat file as shown below</p>
  <pre><code>set SERVICE_NAME=sample
  set PR_INSTALL=D:\commons-daemon-1.0.15-bin-windows-signed\prunsrv.exe
   
  REM Service log configuration
  set PR_LOGPREFIX=%SERVICE_NAME%
  set PR_LOGPATH=D:\logs
  set PR_STDOUTPUT=D:\logs\stdout.txt
  set PR_STDERROR=D:\logs\stderr.txt
  set PR_LOGLEVEL=Error
   
  REM Path to java installation
  set PR_JVM=C:\Java\jre7\bin\client\jvm.dll
  set PR_CLASSPATH=D:\commons-daemon-1.0.15-bin-windows-signed\Daemon.jar
   
  REM Startup configuration
  set PR_STARTUP=auto
  set PR_STARTMODE=jvm
  set PR_STARTCLASS=com.SomeService
  set PR_STARTMETHOD=start
   
  REM Shutdown configuration
  set PR_STOPMODE=jvm
  set PR_STOPCLASS=com.SomeService
  set PR_STOPMETHOD=stop
   
  REM JVM configuration
  set PR_JVMMS=256
  set PR_JVMMX=1024
  set PR_JVMSS=4000
  set PR_JVMOPTIONS=-Duser.language=DE;-Duser.region=de
  </code></pre>
  <p>In cmd , I install the service using the command</p>
  <pre><code>prunsrv.exe //IS//sample
  </code></pre>
  <p>After this, a service named sample become available in the list of services and when I tried to start it it shows:</p>
  <blockquote>
  <p>Windows could not start the sample on Local Computer. For more information review the System event log. If this is a non-Microsoft service, contact the service vendor and refer to the server specific</p>
  <p>error code 1</p>
  </blockquote>
  <p><strong>UPDATED</strong>
  When I run</p>
  <pre><code>prunsrv.exe //ES//sample
  </code></pre>
  <p>it shows</p>
  <pre><code>The data area passed to a system call is too small.
  Failed to start service
  </code></pre>
  <p>Can any one help me in this?</p>