ProcessBuilder API fails to handle the parameters if it contains space in it.
For Example,
ProcessBuilder procObj=new ProcessBuilder("ant -v -f build.xml");
Comments
The ProcessBuilder(String...) method accepts only individual arguments; it does not parse the string as does Runtime.exec(String).
12-09-2018
Similar Issue : https://bugs.openjdk.java.net/browse/JDK-7177083