I am using Java-7 and process builder to run shell script using Tomcat 7.
processBuilder = new ProcessBuilder("/bin/bash", "/opt/script.sh");
processBuilder.start();
As the above mention code invoked via JSP page hosted by Tomcat7 Server, so the command run but process is not able to continue as it is initiated by tomcat7 user (Default user of tomcat) How can i run this command as root, assuming i know root password?