Finsol123
asked on
How to run a batch file in the servlet
Hi,
i have run a batch file in the servlet Run method using Runtime class like Process proc = Runtime.getRuntime().exec( aCommand ); i am getting this exception ,
Exception is access denied (java.io.FilePermission D:/dump.bat execute). could you help me for this.
i have run a batch file in the servlet Run method using Runtime class like Process proc = Runtime.getRuntime().exec(
Exception is access denied (java.io.FilePermission D:/dump.bat execute). could you help me for this.
ASKER
Runtime.getRuntime().exec( "cmd /C d:\\dump.bat"); also not wirking. exception is coming like this Exception is access denied (java.io.FilePermission <<ALL FILES>> execute)
Is your servletengine running with a java SecurityManager? Under which servletengine are you running your code?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
it is working in both servers Tomcat and glassFish.
Open in new window