You should use the exec(String[] args) method, instead:
String[] cmdArgs = { "echo", "Hello", "World!" };
Process process = Runtime.getRuntime().exec(cmdArgs);
BufferedReader in = new BufferedReader(new InputStreamReader(process.getInputStream()));
String line = null;
while ((line = in.readLine()) != null) {
System.out.println(line);
}
The problem is, that the first argument in the exec() method is not the script, but the name of the script.
If you want to use variables, like $1 and $2 you should do that in your script.
So, what you actually might want is:
String[] cmdArgs = { "myscript", "Hello", "World!" };
Process process = Runtime.getRuntime().exec(cmdArgs);
argsnotargList.