views:

49

answers:

2

I close my application by pressing a "Close" button. But in the Eclipse I see a red square indicating that something is still running. When I press this red square, I kill my application completely.

Is it possible to find out what is still running (which method, which loop) using Eclipse?

P.S. I am a newbie. So, it would be nice to have a simple solution. I also might not understand your answer if you use "technical" words which I do not know.

ADDED:

I cannot use System.exit since it will kill not only my software but also an "external" software which calls my software.

A: 

Have a look at jps and jstack commands they will give you the process id for your application and then you can view the threads and their states using jstack.

Its very useful for this kind of issue.

Sorry just realised you wanted something in eclipse to do this. well I'll leave this answer as it should work but not inside eclipse.

Paul Whelan
+1  A: 

Debug View shows just that. To see the concrete methods for each thread you need to stop the application. Most probably you just need to set default close operation for the main JFrame.

Ha