Hi all. I am currently developing a program that will be able to
retrieve the mac address of an individual computer or a group of
computers on the network.
The idea of the program is that my program is run from one computer
which is attached to the network and then I can select a room number
or type in the computer name the program will then talk to the network
to retrieve the computers MAC address.
However I don't have a clue about how I can get the mac address of a
computer.
Any help in this matter would be highly appreciated.
Thank you
Pseudo Silk Kimono - 28 Aug 2007 21:44 GMT
On 2007-08-28, christopher_board@yahoo.co.uk blabbered on and on about Retrieving mac address of remote computer in comp.lang.java.help w
> Any help in this matter would be highly appreciated.
>
> Thank you
A quick google search reveals a whole discussion of this topic in one of
the java forums
http://forum.java.sun.com/thread.jspa?threadID=615562&messageID=3424234
I used this search
http://www.google.ca/search?hl=en&q=java+mac+address&btnG=Google+Search&meta=
Not sure if this will be of much use, but it might be a starting point
for you.

Signature
What were you? A jock or a brain?" http://blinkynet.net/comp/uip5.html
"I was a ghost." PSK - RLU 452647
Warrick Brown and Gil Grissom (Bully for You)
Roedy Green - 28 Aug 2007 23:33 GMT
>However I don't have a clue about how I can get the mac address of a
>computer.
You have to write the code in C. It is extremely hairy in Windows.. I
started on it once thinking it was a 1 hour project, and abandoned it
and wrote it up as a student project. Then you glue that to Java with
JNI.
See http://mindprod.com/project/macaddress.html
and follow the links for hints on how to proceed.

Signature
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
Gordon Beaton - 29 Aug 2007 07:11 GMT
> However I don't have a clue about how I can get the mac address of a
> computer.
Use NetworkInterface.getHardwareAddress() for each of the interfaces
returned by NetworkInterface.getNetworkInterfaces().
Note that a host often has multiple network interfaces and
correspondingly many MAC addresses. It's up to you to decide which is
"the" MAC address.
/gordon
--