[DEV] error in filme propeprtyies
This commit is contained in:
parent
c1e1acaca5
commit
46966e0e44
Binary file not shown.
@ -70,17 +70,23 @@ public class WebLauncher {
|
|||||||
entry.disconnect();
|
entry.disconnect();
|
||||||
entry = null;
|
entry = null;
|
||||||
*/
|
*/
|
||||||
|
HttpServer server = GrizzlyHttpServerFactory.createHttpServer(getBaseURI(), rc);
|
||||||
|
Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
System.out.println("Stopping server..");
|
||||||
|
server.stop();
|
||||||
|
}
|
||||||
|
}, "shutdownHook"));
|
||||||
|
|
||||||
|
// run
|
||||||
try {
|
try {
|
||||||
HttpServer server = GrizzlyHttpServerFactory.createHttpServer(getBaseURI(), rc);
|
|
||||||
server.start();
|
server.start();
|
||||||
|
System.out.println("Jersey app started at " + getBaseURI());
|
||||||
System.out.println(String.format(
|
System.out.println("Press CTRL^C to exit..");
|
||||||
"Jersey app started at " + "%s\nHit enter to stop it...",
|
Thread.currentThread().join();
|
||||||
getBaseURI(), getBaseURI()));
|
|
||||||
|
|
||||||
System.in.read();
|
|
||||||
server.shutdownNow();
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
System.out.println("There was an error while starting Grizzly HTTP server.");
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user