package com.direct.str;
import java.io.IOException;
public class RunTimeDemo {
/**
* @param args
*/
public static void main(String[] args) {
double a=12.45;
long b = Math.round(a);
try {
Process process = Runtime.getRuntime().exec("notepad.exe");//打开记事本
//mspaint.exe 打开画板
try {
Thread.sleep(10000);//睡10s
} catch (InterruptedException e) {
e.printStackTrace();
}
process.destroy();//销毁进程
} catch (IOException e) {
e.printStackTrace();
}
}
}
浙公网安备 33010602011771号