会员
周边
捐助
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
pzy4447
博客园
首页
新随笔
联系
管理
2014年1月18日
Java实现Windows平台下Ping的最佳方法
摘要: 先上结论:通过调用系统自带的Ping命令来实现,使用exitValue()值来判断Ping的结果。按照惯例,0表示ok,1表示不通。private static void pingTest1() throws Exception { String[] ipStrings = { "127.0.0.1", "10.0.0.1", "8.8.8.8", "10.0.0.2", "114.114.114.114", ...
阅读全文
posted @ 2014-01-18 20:09 pzy4447
阅读(1247)
评论(0)
推荐(0)
编辑