Running JVM inside Windows C console app becomes zombie if debugging is stopped in the middle
I wrote a C program that starts a JVM using JNI_CreateJavaVM. The program is a Windows console application (VC 2008). JNI version is 1.6.
If I debug the program and then stop the debugging in the middle, before it reaches the call to DestroyJavaVM then the CMD.exe window remains open and I'm unable to close or kill it. If I look at the Task Manager the CMD window appears in the Applications list but there's no cmd开发者_如何学运维.exe process in the processes view. There's no java process either.
Any idea how to get rid of this zombie?
Well, you might try using Process Explorer: drag the crosshair icon from its toolbar onto one of these console windows and see what process is selected in the process list.
If that doesn't work, or if it turns up csrss.exe
(you don't want to kill that!), then you'll have problems...
精彩评论