File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Threads and Synchronization and the fly likes kill a running threads Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "kill a running threads" Watch "kill a running threads" New topic

kill a running threads

pablo barrionuevo

Joined: Dec 21, 2005
Posts: 2
Hi all,

Need some help here. How do we kill a running threads after elapsing a settime say about 5 hours?
I want to use some JVM parameter to do this, i mean without modify code.

Any help is appreciated.
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
I think you're out of luck trying to kill one thread. You could kill a whole application (JVM) from the command line but that doesn't sound like what you're after.

What is the thread doing? Are you completely unable to change any code?

A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
I agree. Here's the link:
subject: kill a running threads
It's not a secret anymore!