i tried to get different client systems MAC addresses who are accessing my application...but i got only one address MAC (server system) all the time.. below code: InetAddress ip = InetAddress.getLocalHost(); Enumeration<NetworkInterface> networks = NetworkInterface.getNetworkInterfaces(); while (networks.hasMoreElements()) { NetworkInterface network = networks.nextElement(); byte[] mac = network.getHardwareAddress(); if (mac != null) { System.out.print("Current MAC address : "); StringBuilder sb = new StringBuilder(); for (int i = 0; i < mac.length; i++) { sb.append(String.format("%02X%s", mac[i], (i < mac.length - 1) ? "-" : "")); } System.out.println(sb.toString()); } } output: single MAC Address ( Server MAC Address) But the problem is i want different MAC address of different client systems who are accesssing my application...will you please help me..Thank you from srinivas
| 0 |