Hey,
is it possible to call a shellscript or the shellcode in a java class?
My Code (in a static method):
Runtime rtime = Runtime.getRuntime();
Process child = rtime.exec("/bin/bash");
BufferedWriter outCommand = new BufferedWriter(new
OutputStreamWriter(child.getOutputStream()));
outCommand.write("streamer -c /dev/video0 -b32 -o test.jpeg");
outCommand.flush();
outCommand.close();
child.destroy();
But I get this error, if i try this code in my jsp page (tomcat6):
java.security.AccessControlException: access denied (java.io.FilePermission /bin/bash execute)
Any solution for this problem?
EDIT: ls -l /bin/bash shows me follwing line:
-rwxr-xr-x 1 root root 875596 2009-09-14 07:09 /bin/bash
Thanks