MAC Address using Java
* How to get the MAC Address of a computer?
* How to get the MAC Address of a computer using Java?
* How to get the MAC Address of a computer via programming?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
| import java.net.*;class GetMac{public static void main(String arg[]){try{InetAddress address = InetAddress.getLocalHost();NetworkInterface nwi = NetworkInterface.getByInetAddress(address);byte mac[] = nwi.getHardwareAddress();System.out.println(mac);}catch(Exception e){System.out.println(e);}}} |
Posted from WordPress for Android
No comments:
Post a Comment