Run cmd command line on windows by java

ProcessBuilder builder = new ProcessBuilder(“cmd.exe”, “/c”, “adb kill-server && adb start-server && adb devices”);
builder.redirectErrorStream(true);
Process p = builder.start();

Leave a Reply

Your email address will not be published. Required fields are marked *