当前位置: 动力学知识库 > 问答 > 编程问答 >

osx - java process does not shutdown even after javac exits on MacOS X

问题描述:

I am using MacOS X 10.5 and it appears to me that the java process would not stop even after all the java source files get compiled successfully by the javac. I have to manually "force quit" the process from the activity monitor each time after javac executes or any other java related process is executed.

Any idea why is the java process getting stuck and not being terminated ?

网友答案:

You should send a QUIT signal to the java process and take a look at the thread dump which should be sent to the console.

ps auxww | grep java

Look for the process-id field of your java process:

kill -QUIT pid-from-ps-above

This will dump (usually to System.out) a list of all of the threads. Look for the threads that are not marked as daemon threads. Those threads have to exit on their own for the process to stop.

See here for more information:

http://java.sun.com/developer/technicalArticles/Programming/Stacktrace/

分享给朋友:
您可能感兴趣的文章:
随机阅读: