zeratul021
zeratul021

Reputation: 2694

Is there an API for calling system scripts/programs?

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.

Upvotes: 3

Views: 128

Answers (3)

user296828
user296828

Reputation:

Using Runtime.getRuntime().exec(...) except you need to know the name and parameters to pass to system program.

Upvotes: 2

Pascal Thivent
Pascal Thivent

Reputation: 570425

Have a look at Apache Commons Exec.

Upvotes: 3

Reed Copsey
Reed Copsey

Reputation: 564531

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.

Upvotes: 3

Related Questions