Runtime.getRuntime().exec("./test.sh"); - JSP/Java Views : 3333
Tagged in : JSP-Java
1 0
Send mail
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();
}
}
}
By Vinoth, On - 2009-02-21



    Login to add Comments .