title: Java application not exit on calling System.exit(0)
body: <p>I have a Java application running on both Mac and Windows. I call <code>System.exit(0)</code> on user pressing "exit" button. The application works well on Win7. But on Mac, after I press "exit" button, the program can not exit. There is no response from the application.</p>
  
  <p>According to the Activity Monitor, all user threads are terminated. I don't know what the program is waiting for.</p>
  
  <p>I could't paste the whole output of Activity Monitor, but here is an example：</p>
  
  <pre><code>851 Thread_435381: Java: Exception Handler Thread  
  851 Thread_435386: Java: Gang worker#0 (Parallel GC Threads)
  851 Thread_435493
  851 thread_start  (in libsystem_c.dylib) + 34  [0x92abd6de]  
  851 _pthread_start  (in libsystem_c.dylib) + 335  [0x92ab9ed9]  
  851 CAPThread::Entry(CAPThread*)  (in CoreMediaIO) + 123  [0x9a5e3a3d]  
  851 CMIO::DAL::RunLoop::OwnThread(void*)  (in CoreMediaIO) + 160  [0x9a5eded2]  
  851 CFRunLoopRunInMode  (in CoreFoundation) + 120  [0x9329c328]  
  851 CFRunLoopRunSpecific  (in CoreFoundation) + 332  [0x9329c47c]  
  851 __CFRunLoopRun  (in CoreFoundation) + 1428  [0x9329cda4]  
  851 __CFRunLoopServiceMachPort  (in CoreFoundation) + 170  [0x93293c7a]  
  851 mach_msg  (in libsystem_kernel.dylib) + 70  [0x942601f6]  
  851 mach_msg_trap  (in libsystem_kernel.dylib) + 10  [0x94260c22]'  
  </code></pre>