Java Mac Address Get GetMachineAddress()

Here you can find the source of GetMachineAddress()

Description

Indicates the IP address of the machine where this software is being run

License

Open Source License

Exception

Parameter Description
Exception an exception

Return

IP address

Declaration

public static String GetMachineAddress() throws Exception 

Method Source Code


//package com.java2s;
// it under the terms of the GNU General Public License as published by

import java.net.InetAddress;

public class Main {
    /** Indicates the IP address of the machine where this software is being run
     *//from  w w  w  .j  a v a2s  .co  m
     * @return IP address
     * @throws Exception
     */
    public static String GetMachineAddress() throws Exception {
        return InetAddress.getLocalHost().getHostAddress();
    }
}

Related

  1. getMacAddress(String separator)
  2. getMacAddressBytes()
  3. getMacAddresses()
  4. getMacAddressString()
  5. getMacAddrs()