3

I'm looking for a package to support reliably executing external processes from Java. My criteria:

  • Abstract over OS. So if I want to run 'foo', it will look for 'foo.bat', 'foo.exe' under windows and 'foo' under other OSs (or, have a way of passing a map of os->command)
  • Being able to execute Java classes by simply giving the class name and arguments (so the package locates the java command, copies jvm flags and then executes)
  • Process stdout and stderr properly
  • Watchdog / Monitoring capabilities

I've looked at commons-exec but it looks like it answers only 3 & 4. Ant has support for execution but looks like an overkill to use it for this purpose only.

1 Answer 1

1

You will likely have to go with 'commons-exec' and then roll up your sleeves and write some code.

Those are pretty specific requirements.

Sign up to request clarification or add additional context in comments.

2 Comments

Does this mean you've encountered this issue and did some research to find there's nothing available, or just by looking at the question it looks too specific to you?
I've worked on projects dealing with the last two points (3 & 4), and I've used commons-exec and Ant. But I have never seen a requirement similar to your first two points.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.