|
|
Runtime.getRuntime().exec("./test.sh"); - JSP/Java
|
Views : 3333
|
|
Tagged in : JSP-Java
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
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 |
|
|
|