users@jersey.java.net

Sun's lightweight built in HttpServer hangs on windows

From: William Brogden <wbrogden_at_bga.com>
Date: Thu, 03 Apr 2008 14:32:57 -0500

Well I tried ctrl-Break but this is all I got:
2008-04-03 14:22:19
Full thread dump Java HotSpot(TM) Client VM (10.0-b19 mixed mode, sharing):

"Thread-2" daemon prio=6 tid=0x030df400

-------------------
Some searching on System.in.read() indicates this Windows problem is
well known - nobody seems have a way around it to detect a keypress
in a Command Prompt window without using in.read() and available()
doesnt work. Using a GUI of course it is simple.

Bill

So I am going with

          while( true ){
            try { Thread.sleep(1000);
            }catch(InterruptedException e){}
          }

but this has the great disadvantage of not giving you a chance
to shut down gracefully.
(Wondering what the minimum AWT window would be.....)
Bill