同意楼上的 在windows下面可以考虑调用本地进程,我再加几句
String c1="ping X.X.X.X";
Process p=Runtime.getRuntime().exec(c1);
InputStream is=p.getInputStream();//获取输入流
然后就可以读取该进程向控制台的输出,你自己判断下
String command1 = "cmd /c net send ....";
Process p = Runtime.getRuntime().exec(command1);
p.waitFor();
p.destroy();
use this only in Windows.
底层通信要用相关API,scoket方面的