Hi, is there something like API built atop the standard ProcessBuilder for calling system programs? I won't argue that scripts can be ported to Java but utilities like arping and netstat are good-to-go in Linux.
+3
A:
Why not just use the standard ProcessBuilder class... It handles calling scripts pretty well. Here is a post showing how this can be used to call a command via bash.
Reed Copsey
2010-04-03 01:35:27
Thanks, I'm using few projects from Apache commons but I never spotted this one.
Zeratul
2010-04-03 01:55:12
+2
A:
Using Runtime.getRuntime().exec(...)
except you need to know the name and parameters to pass to system program.
jex
2010-04-03 01:46:48
Hi, I was asking for API deliberately because my next work will make heavy use of calling programs and as a part of exploration whether or not to try write one.
Zeratul
2010-04-03 02:01:57