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 / September 2005

Tip: Looking for answers? Try searching our database.

MAC addresses

Thread view: 
JTMOBAP - 20 Sep 2005 21:55 GMT
Is there a way in Java to retrieve the mac address of a local computer?
Real Gagnon - 20 Sep 2005 22:11 GMT
> Is there a way in Java to retrieve the mac address of a local computer?

Not in pure Java. Without using a JNI routine, one way is to launch the
appropriate external utility for your OS and capture/parse the output.

For example :

Win98 : arp -a
Win Nt/2K/XP : ipconfig /all

Bye.
Signature

Real Gagnon  from  Quebec, Canada
* Looking for Java or PB code examples ? Visit Real's How-to  
* http://www.rgagnon.com/howto.html

Thomas Hawtin - 20 Sep 2005 22:25 GMT
> Is there a way in Java to retrieve the mac address of a local computer?

Java SE 6 will have java.net.NetworkInterface.getHardwareAddress.

Tom Hawtin
Signature

Unemployed English Java programmer
http://jroller.com/page/tackline/

Roedy Green - 21 Sep 2005 00:40 GMT
>Is there a way in Java to retrieve the mac address of a local computer?

I is incredibly difficult to do. It requires JNI and reams and reams
and reams of Windows API gobbledegook.  I don't know anyone who has
had the patience.  I might be persuaded for a fee.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.

Jeff Schwab - 21 Sep 2005 02:54 GMT
>>Is there a way in Java to retrieve the mac address of a local computer?
>
> I is incredibly difficult to do. It requires JNI and reams and reams
> and reams of Windows API gobbledegook.  I don't know anyone who has
> had the patience.  I might be persuaded for a fee.

Why necessarily Windows?
Roedy Green - 21 Sep 2005 03:43 GMT
>Why necessarily Windows?

Usually that the most common platform people want JNI for, Solaris
next, then Linux.  IF you don't wait for Java 1.6, you have to solve
the problem separately for each OS.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.



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.