
hi all,
i want to invoke shell program from java. i m using the following code.
package script;
import java.io.IOException;
public class RunShell { public static void main(String[] args) throws IOException { try { Runtime rt= Runtime.getRuntime(); rt.exec("chmod 777 sample.sh"); Process proc=rt.exec("./sample.sh"); proc.waitFor(); } catch (Exception e) { e.getMessage(); } }
} But its not working. it shows error. class not found. help me in doing this.
thanks & regards Lachu.