import java.io.*;public class test {
  public static String mac1, bb, cc, dd, netdata;
  public test() {
    cc = "";
    dd = "";
    String netdata = "";
    try {
      java.lang.Process proc = Runtime.getRuntime().exec("ipconfig /all");
      InputStream istr = proc.getInputStream();
      byte[] data = new byte[1024];
      istr.read(data);
      netdata = new String(data);
      System.out.println(netdata);      int indexof = netdata.indexOf("Physical Address");
      if (indexof > 0) {
        bb = netdata.substring(indexof, netdata.length());
        System.out.println("bb" + bb);        int indexof1 = bb.indexOf(":");
        if (indexof1 > 0)
          cc = bb.substring(indexof1 + 1, bb.length()).trim();
        System.out.println(cc);        dd = cc.substring(0, 17);
        System.out.println(dd);      }    }
    catch (IOException e) {
      System.out.println("error=" + e);
    }  }
}public class Untitled1 {
  public static void main (String[] args ) {
    Test test = new Test();
    System.out.println(test.dd);
    
  }
}