启动tomcat时打开本地文件
File file = new File("temp.html");
Runtime ce=Runtime.getRuntime();
//输出路径
System.out.println(file.getAbsolutePath());
//执行本地html文件
ce.exec("cmd /c start "+file.getAbsolutePath());
//强制退出
System.exit(0);
启动tomcat时打开本地文件
File file = new File("temp.html");
Runtime ce=Runtime.getRuntime();
//输出路径
System.out.println(file.getAbsolutePath());
//执行本地html文件
ce.exec("cmd /c start "+file.getAbsolutePath());
//强制退出
System.exit(0);