public static void windowsServer(){
try {
Runtime rt = Runtime.getRuntime();
Process pr = rt.exec("cmd /c net stop MSSQL$SQLEXPRESS"); // cmd /c calc
// Process pr = rt.exec("D:\\xunlei\\project.aspx");
InputStream input = pr.getInputStream();
InputStreamReader reader = new InputStreamReader(input, "GBK");
BufferedReader in = new BufferedReader(reader);
String line = null;
while ((line = in.readLine()) != null) {
System.out.println(line);
}
int exitVal = pr.waitFor();
System.out.println("Exited with error code " + exitVal);
} catch (Exception e) {
System.out.println(e.toString());
e.printStackTrace();
}
}