Run bat file in JSP
Posted on 2008-06-12
I need to run a bat file in jsp. I used the below method to run but I it seem to only run 2 lines of my bat file, may I know what is the problem??? When I do a double click on the bat, it is working fine !
File file = new File(AppPath2);
Process p = Runtime.getRuntime().exec("cmd.exe /C \"" + batfile + "\"", null, file);