I need to restart a Java Thread in my application. what would be the
safe way of doing this.
You can't restart a thread. From the javadoc:
"It is never legal to start a thread more than once. In particular, a
thread may not be restarted once it has completed execution."
You have lots of choices to get the effect you want. You can
create new threads to pick up where the dead threads leave off; better
would be to use one of the java.util.concurrent.* classes from 1.5 if
possible to provide a thread pool. There are other goodies in
java.util.concurrent that you may find helpful as well. If 1.5 isn't
an option for you, you still have a lot of flexibility, it just won't
come nicely wrapped with love from Sun - you'll have to write
something to suit your needs yourself.