I have an application, running on the Playframework, which needs to encode some video files. I used
Process pr = Runtime.getRuntime().exec(execCode)
You need to specify the arguments as separate Strings:
Strings
new ProcessBuilder("cmd", "arg1", "arg2", ...);
The constructor accepts String, varargs, and List<String>.
String
varargs
List<String>
See ProcessBuilder documentation.