All pastes #576397 Raw Edit

Anonymous

public java v1 · immutable
·published 2007-06-19 13:47 UTC
rendered paste body
import java.io.IOException; import java.util.Scanner; public class macaddress {        /**     * Creates a new instance of macaddress     */    public macaddress() {    }      public static String getMacAddress_ipconfig() throws IOException   {     Process proc = Runtime.getRuntime().exec( "cmd /c ipconfig /all" );     Scanner s = new Scanner( proc.getInputStream() );     return s.findInLine( "\\p{XDigit}\\p{XDigit}(-\\p{XDigit}\\p{XDigit}){5}" );   } }