How do you get the ethernet address using Java?

Posted by Frank Krueger on Stack Overflow See other posts from Stack Overflow or by Frank Krueger
Published on 2008-08-29T04:31:24Z Indexed on 2010/04/16 21:03 UTC
Read the original article Hit count: 256

Filed under:
|
|
|

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.

© Stack Overflow or respective owner

Related posts about java

Related posts about networking