This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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
subject: kill a running threads
Similar Threads
how to kill a process(I know the port in which it runs)
How to kill a child thread from its parent?
Thread Stops
OutOfMemory error QUESTION
If not listening to socket but might later, kill threads in pool, recreate?