import java.io.*; import java.net.*; import java.util.*; import java.util.regex.*; public class GetMac { public static void main(String[] args) throws IOException { String address = new GetMac().getMacAddress(); System.out.println(address); } public String getMacAddress() throws IOException { String macAddress = null; String command = “ipconfig /all”; Process pid = Runtime.getRuntime().exec(command); BufferedReader in = new BufferedReader( new InputStreamReader(pid.getInputStream())); while (true) [...]
Filed under: java | Tagged: java, mac address | 3 Comments »
















