34 lines
814 B
Java
Raw Normal View History

2019-10-03 08:42:09 +02:00
package com.wasteinformationserver;
2019-09-20 15:02:17 +02:00
2019-10-03 08:42:09 +02:00
import com.wasteinformationserver.basicutils.Log;
import com.wasteinformationserver.website.Webserver;
2019-09-13 15:41:40 +02:00
public class main {
public static void main(String[] args) {
2019-09-20 15:02:17 +02:00
/*
2019-10-03 08:42:09 +02:00
com.wasteinformationserver.Date D=new com.wasteinformationserver.Date();
2019-09-13 16:48:53 +02:00
D.getdata();
D.printList();
2019-09-20 15:02:17 +02:00
*/
Runtime.getRuntime().addShutdownHook(new Thread(() -> {
try {
Thread.sleep(200);
2019-10-02 21:42:04 +02:00
Log.warning("Shutting down ...");
//shutdown routine
} catch (InterruptedException e) {
e.printStackTrace();
}
}));
2019-10-03 08:42:09 +02:00
Thread mythread = new Thread(() -> new Webserver().startserver());
2019-09-20 16:46:13 +02:00
mythread.start();
2019-09-13 16:48:53 +02:00
2019-10-02 21:42:04 +02:00
Log.message("thread started");
2019-09-20 16:46:13 +02:00
2019-09-13 15:41:40 +02:00
}
}