How to kill system process?

I’ve searched the internets and found a solution to this problem but
only using ruby … and I’m using jruby1.4. Here is the problem … I’m
using a timer to kill a Thread which may or may not run for a long time.
The thread calls system which spawns off a process. Timer does not work
with system calls. There is a work around using SystemTimer but jruby
does not allow for it. I’ve tried using multiple threads where one would
kill the other thread which spawned off the system call … and that
works but the system call does not die. Any ideas on how to get around
this?