简单的在java运行一个程序
public static void main(String[] args) {
Runtime runtime = Runtime.getRuntime();
// 开启运行外部程序
try {
// 打开指定位置的应用程序,后面是地址
runtime.exec(""D:\bilbil\bilibili\哔哩哔哩.exe"");
Process pro = runtime.exec("notepad.exe");
// 十秒后自动关闭程序
Thread.sleep(10000);
pro.destroy();
} catch (Exception e) {
e.printStackTrace();
}
}


