我正在尝试开发一个 Java 工具来重构 css 文件。我正在尝试从 Java 访问命令提示符。命令提示符可以正常打开,但没有运行 csstidy exe 文件。
try {
String command = "cmd /c start cmd.exe /K \"cd C:/Users/BS11040/Desktop/CSSTIDY_JAVA/";
Process child = Runtime.getRuntime().exec(command);
OutputStream out = child.getOutputStream();
out.write("csstidy.exe /r/n".getBytes());
out.flush();
out.close();
} catch (IOException e) {
e.printStackTrace();
}