So the villain is System.in.read - I am surprised.
Here is what I used to get it running!!
System.out.println("Server running");
System.out.println("Visit:
http://localhost:9998/matching/domain/word");
System.out.println("Hit ^C to stop...");
boolean running = true ;
while( running ){
try { // sleep one second
Thread.sleep( 1000 ) ;
}catch( InterruptedException e ){
System.out.println("Interrupted");
running = false ;
}
}
-------------
^C just kills the whole thing, the System.out.println("Interrupted")
never runs so I suppose I could have just used sleep with a really long
value.
Bill