title: How to create a windows service with winrun4j
body: <p>I've been reading the documentation but I can't start and stop de service.</p>
  
  <p>My .ini file is:</p>
  
  <pre><code>main.class=test.TestService
  service.class=test.TestService
  service.id=StreamServer
  service.name=StreamServer
  service.description=Servidor que proporciona una comunicación con streams.
  service.controls=stop   
  classpath.1=*.jar
  </code></pre>
  
  <p>The TestService class is:</p>
  
  <pre><code>package test;
  
  public class TestService{
      private static TestServer server;
  
      public static void main (String[] args){
          if (args.length == 1){
              if (args[0].equals ("start")){
                  if (server == null){
                      server = new TestServer (5000);
                      server.start ();
                  }
              }else if (args[0].equals ("stop")){
                  if (server != null){
                      server.stop ();
                      server = null;
                  }
              }
          }
      }
  }
  </code></pre>
  
  <p>I have to modify this class but I don't know how.</p>
  
  <p>Thanks.</p>