According to documentation, execute(CommandLine)
starts synchronous execution. That is, it blocks the calling thread. You probably want asynchronous execution, so use execute(CommandLine command, ExecuteResultHandler handler)
. For example,
DefaultExecutor executor = new DefaultExecutor();
executor.execute(new CommadLine("cmd /c start C:\\Users\\xx\\program.exe"),
new DefaultExecuteResultHandler());