0

I am writing a unit test for a Java program, and I need to simulate a Unix kill. Is there any way that this is possible?

Thanks!

Jan S
  • 1,805
  • 15
  • 20
  • I'd written the rest of the unit test, but wasn't able to find out what command I could use to Kill the program from within it. Will try if the above (duplicate)answer helps. – Jan S Oct 19 '13 at 23:41

1 Answers1

1

In short, no, there isn't.

On a unix system, the best bet is to use Runtime.exec().

Paul Wagland
  • 25,794
  • 9
  • 50
  • 74