I have a problem.
Sometimes when I close my Java applet using the “Close button” in the upper right corner, the console freezes and becomes nonrespondable. The Java process does not shutdown and proceeds to use the maximum of a CPU.
It is only in one of ten times that this happends. It is also not dependant on browsers.
I have made sure that all my threads are properly shutdown along with my threadpool executors.
This is also only happening in applet mode. When I run this in Netbeans, I have never encountered this problem.
I am using Netbeans on Windows.
What could be the reason for the Java console to be hanging like that ?
And how can I determine what the causes of this hanging could be ?
Run your applet in debug more (see here how to do it in Eclipse).
Create a remote debug launch config (see link above).
Close the applet
When the bug happens, start the remote debug launch and pause the whole VM. Now you can inspect the threads to see what happens.