How to get mac address?

I have used NetworkInterface.getNetworkInterfaces() for get list of interfaces
but under xp I not read interface informations.
Is possible that the problem is permission level of user?
Thanks.

Some call in Java are OS dependent and work better on some OS than other. If there is a permissions issue it is at the OS level and Java would not be aware of it. (But I doubt this is the case)
It is possible that information is not available under windows.
However you can call "ipconfig /all" and parse the MAC address from that.

Similar Messages

  • How to get MAC address from IP address in LAN

    Hi all,
    How to get MAC address from IP address in LAN (windows or any OS), I would have all IP addresses of my LAN, so I would like to know all MAC address.
    Code examples are highly appreciated.
    Thanks & Regards,
    abel...

    abel wrote:
    Yeah that is only working for local system, but how to get remote system's MAC ..?
    Thanks for quick reply ...
    Edited by: abel on Jan 28, 2009 12:10 AMIt is my understanding that only one person ever found the holy grail which you seek. But sadly [_he's dead_|http://forums.sun.com/profile.jspa?userID=649366]
    As a curious aside how did you manage to get the list of IPs?

  • How to get MAC address using java code

    hi friends
    please write me, How can I get MAC Address of local machine using java code.I don't want to use JNI.
    Please reply me. Its urgent for me
    Thanks in advance
    US

    You have several ways under *nix
    ifconfig -a | grep HWwill output something like
    eth0      Lien encap:Ethernet  HWaddr 00:11:FF:74:FF:B4combined with Runtime.getRuntime().exec("")and Process.getInputStream()you should be able to read it easilly.
    Under Windows (and Linux of course) try jpcap (http://sourceforge.net/projects/jpcap)
    You can also use jnative as a generic tool (http://sourceforge.net/projects/jnative)
    --Marc (http://jnative.sf.net)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to get Mac Address of Remote Computer

    Hi All,
    I tried to find out a solution for finding Mac Address of a remote system, then first i tried with finding it with local address using the following code it works fine for me.
    public class MacAddressFinder {
         public static void main(String[] args) {
              try
                   InetAddress ipAddr = InetAddress.getLocalHost();
                   System.out.println("Current IP address : " + ipAddr.getHostAddress());
                   NetworkInterface nwIntf;
                   try
                        nwIntf = NetworkInterface.getByInetAddress(ipAddr);
                        byte[] hwAddr = nwIntf.getHardwareAddress();
                        System.out.print("Current MAC address : ");
                        StringBuilder sb = new StringBuilder();
                        for (int i = 0; i < hwAddr.length; i++)
                             sb.append(String.format("%02X%s", hwAddr, (i < hwAddr.length - 1) ? "-" : ""));          
                        System.out.println(sb);
                   } catch (SocketException e) {
                        e.printStackTrace();
              catch (UnknownHostException e) {
                   e.printStackTrace();
    But when i tried this piece of code in jsp with the following code i am getting NeworkInterface object value as null and there by i am unable to get the Mac Address of a remote computer.
    InetAddress ipAddr = InetAddress.getByName(request.getRemoteAddr());
    NetworkInterface nwIntf = NetworkInterface.getByInetAddress(ipAddr);Can you please suggest me how to find out the Mac address of remote system?
    Thanks,
    Uday

    first of all, NetworkInterface only exposes the NetworkInterfaces of the local computer. secondly, you cannot find the mac address of an arbitrary remote computer. that information is not available outside of the local subnet. and java doesn't expose a way to discover it even for computers on the local subnet.

  • How to get MAC address from client machine ?

    Hi dear,
    We are implementing security measures for a banking system, so it is required that we track the MAC address of the registered clients along with other parameters. How do we get the MAC address from client machine using ADF or running scripts in client side?
    thanks all

    Hi,
    Welcome to OTN.
    Your question has nothing to do with ADF as such. Googling would give you plenty of such topics.
    -Arun

  • How to get MAC Address from device?

    Does any one knows, how we can get programmatically the MAC address of Blackberry device?
    Is it possible to get it through BES IT Policy?
    - Thanks

    abel wrote:
    Yeah that is only working for local system, but how to get remote system's MAC ..?
    Thanks for quick reply ...
    Edited by: abel on Jan 28, 2009 12:10 AMIt is my understanding that only one person ever found the holy grail which you seek. But sadly [_he's dead_|http://forums.sun.com/profile.jspa?userID=649366]
    As a curious aside how did you manage to get the list of IPs?

  • How to get MAC address of a phone

    Hi,
    I am able to retrieve phone details by sending Soap request to RisPort. But the response doesn't have MAC address of the phone. Can any one please let me know how to get this information.
    Here is my Soap request
    <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body><SelectCmDevice soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><CmSelectionCriteria href="#id0"/><StateInfo xsi:type="xsd:string"/></SelectCmDevice><multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns1:CmSelectionCriteria" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="tns:CmSelectionCriteria"><maxReturnedDevices xsi:type="xsd:unsignedInt">10</maxReturnedDevices><Class xsi:type="soapenc:string">Phone</Class><Model xsi:type="xsd:unsignedInt">255</Model><nodeName xsi:type="soapenc:string"/><selectBy xsi:type="soapenc:string">Name</selectBy><selectItems xsi:type="soapenc:Array" xsi:nil="true"/><status xsi:type="soapenc:string"/></multiRef></soapenv:Body></soapenv:Envelope>

    When you receive the response, you receive the name of the ip phone. The name is something like: SEPXXXXXXXXXXXX where all the X correspond to the MAC address of the phone.

  • How to get MAC Address of my stolen HP-15d103tx laptop

     I do have my Serial No-[Moderator edited Serial] and product no- G2G48PA#ACJ. My laptop has been stolen on 2nd April 2015. When i lodge a F.I.R with police they told me to submit the MAC address of the Laptop. Is there any way to know my mac address? Please suggest .

    Alok_456 wrote:
     I do have my Serial No-[Moderator edited Serial] and product no- G2G48PA#ACJ. My laptop has been stolen on 2nd April 2015. When i lodge a F.I.R with police they told me to submit the MAC address of the Laptop. Is there any way to know my mac address? Please suggest .
    If you didn't write it down the first time it will almost next to impossible to find it also this doesn't gurantee in any way you can get your laptop back either. MAC is only good if you wrote it down or registered it but if none of this is written down. And if you don't have tracking software installed the chances of getting it back is harder to get it back. So unless you see it being sold by someone or online this is the only real way you can track it down.
    I am a Volunteer to help others on here-not a HP employee.
    Replies aren't online 24/7 because of Time Zone differences.
    Remember in this Day and Age of Computing the Internet is Knowledge at your fingertips if you choose understand it. -2015-

  • How to get MAC Address of a stolen laptop by using Serial number?

    Hi my Lenovo G560 laptop was stolen on 17/04/13. I have the serial number. In order to trace the laptop, I need the MAC address. Unfortunately I don't know the MAC address of my stolen laptop. My question is, is it possible to get the MAC address by using serial number? 
    Serial Number: xxxxxxxxxx
    Moderator Note; s/n edited for member's own protection

    hi Subrahmanya,
    Sorry to hear about your trouble. Unfortunately, the only way to get the MAC address is to run a query on the unit (physically or or remotely). Using the serial number to query information on the system will list the devices that are included on the unit (this doesn't include the MAC address).
    Regards,
    neokenchi
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"! This will help the rest of the Community with similar issues identify the verified solution and benefit from it.
    Follow @LenovoForums on Twitter!

  • How to get MAC address list and HDD serial number from Windows and MAC machine?

    Hi,
    I'm developing a AIR application. I'm implementing the product key mechanishm. I need to identify the users' machines uniquely. I chose MAC address would be a better way. But a computer has list of MAC addresses including LAN card and Wi-Fi card addresses. So, I need to get the list of available MAC addresses from the computer and the Hard Disk Drive's serial number. HDD serial number would be helpful to cross verify the identity.
    I'm able to get the MAC address using NetworkInfo class. But I need to get a list of available MAC addresses and HDD serial number.
    Is there any classess to accomplish this task?
    Thanks in advance.

    See if this link can be of a little use to you.
    http://www.adobe.com/devnet/air/flex/articles/retrieving_network_interfaces.html#ionComHea ding

  • How to get MAC Address for maintaning unique client id at server side?

    Hi All,
    Can somebody tell how can i get MAC id for maintaing Unique client id at server.
    or is there any alternative way to do this?
    Thanks in advance..
    CK

    Usually people just use cookies for that.

  • How to get MAC ADDRESS in mais.asc using FMS

    Hello,
    i need to get the Mac Address of every machine connected to my fms, is that possible with FMS?
    THX

    It's also available in System Information, under the Network section.
    Hold down option and select System Information from the Apple menu.
    Select Network, then the particular service type: Airport, Ethernet, Firewire
    Scroll down till you see MAC Address:
    You can also reveal it in the Terminal with ifconfig. en0 is usually ethernet, en1 is Airport, but that depends on your configuration.

  • How to get mac address in macbook pro

    Go to System Preference -> Network -> Advanced -> Hardware

    It's also available in System Information, under the Network section.
    Hold down option and select System Information from the Apple menu.
    Select Network, then the particular service type: Airport, Ethernet, Firewire
    Scroll down till you see MAC Address:
    You can also reveal it in the Terminal with ifconfig. en0 is usually ethernet, en1 is Airport, but that depends on your configuration.

  • Get mac address in a container or zone non-global

    I am developing an aplication in c/c++ and in global machine I can get mac address, but in zone non-global don't.
    I have to get the mac address in zone non-global? If so, how?
    Thanks

    Igor_freitas wrote:
    I am developing an aplication in c/c++ and in global machine I can get mac address, but in zone non-global don't.
    I have to get the mac address in zone non-global? If so, how?A non-global zone using a shared-ip stack doesn't have rights to network connection. So you can't easily query the network device directly.
    You can probably run 'arp -a' in the zone and look for your zone's hostname. That's pretty close.
    Darren

  • How to find mac address of a client computer in specified time and port in WIFI WCS Control system

    how to find mac address of a client computer in specified time and port in WIFI WCS Control system

    WCS record-keeping is very crude.  
    You'll get the time/date when the client authenticated.  You'll get the local inside address but you'll need the router to translate the outside IP address and the port.  
    You will need a proxy server to determine what sites did a wireless client goes.

Maybe you are looking for