Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Killing processes from java

807569May 18 2006 — edited May 18 2006
I've got a set of programs written by various people in various languages - all of which I cant change.

They typically do build / continuous integration stuff for several projects, and have a habit of hanging and crashing a lot.
These are long running programs which run on several OS's (to be specific: windows, HP-UX, RedHat Linux AS, Solaris).

What I want to be able to do is set up a "service" (daemon program, whatever) on each box to monitor the running of these programs and kill any program when it "hangs".
For each program type, there is a strategy to determine whether it is still active or not (e.g, recently appended something to a file etc).

I want to provide the guts of the program in java because a) The people who will maintain it know java well and b) Because it has to run on several OS's.

The only thing I cant do directly in java is kill the processes (they are run independantly - and are not started by the "monitor" program).

One idea is to have a per OS script / program invoked by the monitor program to do the killing (e.g, a simple sh script on unix variants).

But Im wondering if anyone either knows of existing java OSS libraries which would let me do a "kill" in an OS agnostic way? (i.e, which already do the OS specific stuff somehow themselves).

~D
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 15 2006
Added on May 18 2006
9 comments
565 views