想调取kettle文件,jsp怎么调用bat文件啊,单试bat是好使的 这是jsp <%@page language="java" contentType="text/html;charset=utf-8" pageEncoding="UTF-8"%> <%@page import="java.util.*"%> <%@page import="java.io.InputStream"%> <%@page import="java.io.IOException"%> <% String cmd = "cmd /c start C://Users//xzb//Desktop//kettle123//test.bat";// pass try { Process ps = Runtime.getRuntime().exec(cmd); ps.waitFor(); } catch (IOException ioe) { ioe.printStackTrace(); } catch (InterruptedException e) { e.printStackTrace(); } System.out.println("child thread donn"); %> <html> <body οnlοad="winclose()"> </body> </html> <script type="text/javascript">
function winclose() { newwin = window.open("","_parent",""); newwin.close(); } </script> |
最佳回答 |
||||
0
|
|