Original Post C cmdpzdr 2 cmdpzdr Jan 24, 2003 at 6:18 PM I need an sample code about daemons in Java. I''m developing an application with daemons.
B bslayerw 18 bslayerw Jan 24, 2003 at 9:03 PM Thread deamonThread = new Thread(new Runnable() { public void run() { System.out.println("Daemon thread run"); //..... System.out.println("Daemon thread done"); } }); deamonThread.setDaemon(true); deamonThread.start(); A daemon thread dies when all other threads in your application die.