I've been reading the documentation but I can't start and stop de service.
My .ini file is:
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
The TestService class is:
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;
}
}
}
}
}
I have to modify this class but I don't know how.
Thanks.