Runtime.getRuntime().exec("./test.sh");
by Vinoth[ Edit ] 2009-02-21 17:54:58
1.Create a Sh file and specify the functionality
2.Run the bellow java code
public class Sh
{
public static void main(String[] args)
{
try
{
Process proc = Runtime.getRuntime().exec("./test.sh");
System.out.println("Print Test Line.");
}
catch (Exception e)
{
System.out.println(e.getMessage());
e.printStackTrace();
}
}
}