我是靠谱客的博主 迅速雨,最近开发中收集的这篇文章主要介绍java 以太网,你如何使用Java获得以太网地址?,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

I would like to retrieve the ethernet address of the network interface that is used to access a particular website.

How can this be done in Java?

Solution Note that the accepted solution of getHardwareAddress is only available in Java 6. There does not seem to be a solution for Java 5 aside from executing i(f|p)confing.

解决方案

It has to be called on the machine you are interested in - the MAC is not transferred across network boundaries (i.e. LAN and WAN). If you want to make use of it on a website server to interrogate the clients, you'd have to run an applet that would report the result back to you.

最后

以上就是迅速雨为你收集整理的java 以太网,你如何使用Java获得以太网地址?的全部内容,希望文章能够帮你解决java 以太网,你如何使用Java获得以太网地址?所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(54)

评论列表共有 0 条评论

立即
投稿
返回
顶部