views:

1320

answers:

1

Java process control is notoriously bad - primarily due to inadequate support by the Java VM/JDK classes (e.g. java.lang.Process).

I am wondering, are there any good open source libraries out there that are reliable.

The requirements would be:

  1. OSS
  2. Start/Stop processes
  3. Manage STDIN and STDOUT
  4. cross platform (at least Linux, Windows, Solaris, HP, and IBM in that order)
  5. (optional) restartable
  6. (desirable) mature
+2  A: 

Java Service Wrapper might be what you're looking for. It's cross-platform, can be used to start things as a Windows service, capture IO, and generally completely manage any java app. It's very light weight and well designed. Atlassian uses it to wrap their products (Jira, Bamboo, etc), so it's battle tested.

trenton
for service management it's fine. but it's hardly a library that can be used for easy process control.also, it's not quite OSS.
Omry
@Omry JSW has a very good process control library (http://wrapper.tanukisoftware.com/doc/english/child-exec.html), the problem is that it isn't OSS.
jnorris