当前位置:早雪网网络学院编程文档Java → java中根据IP取得局域网内的计算机名

java中根据IP取得局域网内的计算机名

减小字体 增大字体 作者:不详  来源:supcode.com收集整理  发布时间:2005-7-22 18:50:35
You may use the class InetAddress,
method is getByName.

String ip_address = "111.11.11.111";
InetAddress host_name = InetAddress.getByName(ip_address);
String Ip_address = host_name.toString();

it can get the computer'ip and name.
for example :
computer a , ip is 111.11.11.111


you may use 
for(){

}

Tags:java,根据,IP,取得,局域,网内,计算,机名
[数据载入中...] [返回上一页] [打 印]

文章评论评论内容只代表网友观点,与本站立场无关!

  评论人:货架   打分:100 分  发表时间:2007-9-19 23:14:13
· 轻型<ahref=http://www.well-racking.com>货架</a>,中型货架,阁楼货架,图书货架,百...
  评论人:杭州婚庆   打分:100 分  发表时间:2007-9-9 2:30:46
· 杭州晨晨婚庆公司是一家从事<ahref=http://www.hzwedding.com>杭州婚庆</a>服务的专业机构...