import java.io.*;
import java.lang.*;
public class javaping {
public static void main(String[] args) {
try {
Process p = Runtime.getRuntime().exec("ping 127.0.0.1");
byte[] msg = new byte[128];
int len;
while((len=p.getInputStream().read(msg)) >0) {
System.out.print(new String(msg, 0, len));
}
String rs = "/n";
byte[] rb = new byte[] { (byte)'/n' } ; //rs.getBytes();
OutputStream os = p.getOutputStream();
os.write(rb);
os.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
import java.lang.*;
public class javaping {
public static void main(String[] args) {
try {
Process p = Runtime.getRuntime().exec("ping 127.0.0.1");
byte[] msg = new byte[128];
int len;
while((len=p.getInputStream().read(msg)) >0) {
System.out.print(new String(msg, 0, len));
}
String rs = "/n";
byte[] rb = new byte[] { (byte)'/n' } ; //rs.getBytes();
OutputStream os = p.getOutputStream();
os.write(rb);
os.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}