I got to know about this Java 1.5 capability recently and I developed a sample code to use this. My objective is to restart the thread when it gets dead due to an uncaught e
You should not restart the thread that is about to exit. The method is invoked when the given thread terminates. So you can only create and start a new thread. If you know about the threads class (by instanceof...) you can obtain the runnable from it and create a new thread in the terminating threads group and start it from the UncaughtExceptionHandler.
But aware: I would check for specific exceptions. A minimum can be: restart only if the throwable is a runtime exception, not an error!