Calling SH Unix command via Java

By far, one of the most simple, yet overlooked simple solution to batch and process executions.

Running an SH via Java isn’t really hard – there’s already an existing Object Utility for it, just need to call it correctly though. Java Code:


the is a custom script I created using nano. Basically, I pass alvin jay and reyes as parameters and get them by using $1,2 and 3.


Console Output: I manage to get the output from the output stream object of the Process.


Download the source code here: