I figure out a way to work around this problem, just wrap the user name and passwd as inputstream:
String input="...";
executor.setStreamHandler( new PumpStreamHandler( System.out, System.err, new ByteArrayInputStream(
input.getBytes() ) ) );