programming-examples/java/Basics/Use of Runtime Class.java
2019-11-18 14:44:36 +01:00

33 lines
529 B
Java

Use of Runtime Class
import java.io.*;
class test extends Thread
{
public void run()
{
Runtime r=Runtime.getRuntime();
Process p=null;
try
{
for(int i=0;i<=100;i++)
{
p=r.exec("net send vishal how r u!");
//p.waitFor();
Thread.sleep(5000);
}
}
catch(Exception e)
{
System.out.println(e);
}
}
public static void main(String args[])
{
test t=new test();
t.run();
}
}