blob: d8a3b397cfde12bbb22a01b216c2cd065ac44125 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
import org.traccar.Server;
public class Main {
public static void main(String[] args) throws Exception {
final Server service = new Server();
service.init(args);
System.out.println("starting server...");
service.start();
// Shutdown server properly
Runtime.getRuntime().addShutdownHook(new Thread() {
@Override
public void run() {
System.out.println("shutting down server...");
service.stop();
}
});
}
}
|