Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / August 2007

Tip: Looking for answers? Try searching our database.

Retrieving mac address of remote computer

Thread view: 
christopher_board@yahoo.co.uk - 28 Aug 2007 21:07 GMT
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

--


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.