How to read a MAC address of the host from a JAVA program
Thanks
Purushotham
-
How to read a MAC address of the host from a JAVA program (4 messages)
- Posted by: Puru Kk
- Posted on: April 30 2002 19:11 EDT
Threaded Messages (4)
- How to read a MAC address of the host from a JAVA program by John King on May 01 2002 04:01 EDT
- How to read a MAC address of the host from a JAVA program by Puru Kk on May 01 2002 17:18 EDT
- Methods show below by truehh truehh on June 02 2006 10:16 EDT
- JDK 1.6 solution by Rohitdev Kulshrestha on December 08 2006 12:41 EST
-
How to read a MAC address of the host from a JAVA program[ Go to top ]
- Posted by: John King
- Posted on: May 01 2002 04:01 EDT
- in response to Puru Kk
I don't think it's possible in a pure java solution. Products like FlexLM do it as part of their functionality, but they delagate the actual reading of the MAC address to a native app. Then the problem is that retrieving the MAC address is very different on different platforms, so the native app is rewritten for each platform, and distributed with the client.
That's my understanding anyway.
-
How to read a MAC address of the host from a JAVA program[ Go to top ]
- Posted by: Puru Kk
- Posted on: May 01 2002 17:18 EDT
- in response to John King
Thanks for the reply. I totally agree with you. I was designing a licensing manager for a wireless product for solaris and for NT. Can you/anyone please point out the native methods to get the MAC of a NT machine as well as MAC for Solaris.
Thanks -
Methods show below[ Go to top ]
- Posted by: truehh truehh
- Posted on: June 02 2006 10:16 EDT
- in response to John King
for windows NT: ipconfig/all for Linux: ifconfig for more detail: http://www.artsci.wustl.edu/ASCC/documentation/macaddrss.html -
JDK 1.6 solution[ Go to top ]
- Posted by: Rohitdev Kulshrestha
- Posted on: December 08 2006 00:41 EST
- in response to truehh truehh
JDK 1.6 has an API NetworkInterface.getHardwareAddress()