In Java, you can use Runtime.getRuntime().exec to execute external shell command. Here is a classical example to execute the ping command and print out its output ...