1.1 --- a/webidor/src/main/java/cz/xelfi/quoridor/webidor/resources/Quoridor.java Wed Jul 29 08:19:35 2009 +0200
1.2 +++ b/webidor/src/main/java/cz/xelfi/quoridor/webidor/resources/Quoridor.java Wed Jul 29 17:24:20 2009 +0200
1.3 @@ -73,16 +73,21 @@
1.4 final String baseUri = "http://localhost:9998/";
1.5 final Map<String, String> initParams = new HashMap<String, String>();
1.6
1.7 + File home = new File(System.getProperty("user.home"));
1.8 + File quoridor = new File(home, ".quoridor");
1.9 +
1.10 + System.setProperty("quoridor.dir", quoridor.getPath());
1.11 +
1.12 initParams.put("com.sun.jersey.config.property.packages",
1.13 "cz.xelfi.quoridor.webidor.resources");
1.14
1.15 - System.out.println("Starting HttpServer...");
1.16 + System.out.println("Starting Quoridor...");
1.17 ResourceConfig rc = new PackagesResourceConfig("cz.xelfi.quoridor.webidor");
1.18 HttpServer threadSelector = HttpServerFactory.create(baseUri, rc);
1.19 threadSelector.start();
1.20 System.out.println(String.format(
1.21 - "Jersey app started with WADL available at %sapplication.wadl\n" +
1.22 - "Try out %shelloworld\nHit enter to stop it...", baseUri, baseUri));
1.23 + "Quoridor started with WADL available at %sapplication.wadl\n" +
1.24 + "Hit enter to stop it...", baseUri, baseUri));
1.25 System.in.read();
1.26 threadSelector.stop(0);
1.27 System.exit(0);