Thread-Killing.
I am working on a Java application which involves multithreading. Now, our application gets locked up and wouldn't stop when used as a windows service. The two threads in background continue to run even when we try to close the application. I was wondering how can i kill the two background threads. Any inputs will be appreciated. I can provide further details if needed.
In our application, in the main class two threads are created using Timer and are scheduled for execution after regular intervals of time. There is an Exit-handler class as well which cleans up the directory contents and in the exit-handler, the two threads(FTP and Upload) are not killed. So, typically we might need to implement some method which will kill these threads when they invoke the exit handler.We might need to use the cancel() to terminate the timer's task thread.
Any inputs will be highly appreciated.

