ERLEDIGT
NEIN
NEIN
ANTWORTEN
0
0
ZUGRIFFE
489
489
EMPFEHLEN
-
26.01.06 22:42 #1
- Registriert seit
- Jun 2002
- Ort
- Saarbrücken (Saarland)
- Beiträge
- 9.886
- Blog-Einträge
- 29
Hallo!
Code :1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
/** * */ package de.tutorials.mustang; import java.net.NetworkInterface; import java.net.SocketException; import java.util.Enumeration; /** * @author Tom * */ public class MustangAPIShowMacAdressExample { /** * @param args */ public static void main(String[] args) { try { Enumeration<NetworkInterface> enumeration = NetworkInterface .getNetworkInterfaces(); while (enumeration.hasMoreElements()) { NetworkInterface networkInterface = enumeration.nextElement(); System.out.println(networkInterface.getDisplayName()); byte[] macAddress = networkInterface.getHardwareAddress(); if (macAddress == null) { continue; } System.out.println("Mac Address: "); System.out.printf( "%1$02x-%2$02x-%3$02x-%4$02x-%5$02x-%6$02x\n", macAddress[0], macAddress[1], macAddress[2], macAddress[3], macAddress[4], macAddress[5]); } } catch (SocketException e) { e.printStackTrace(); } } }
Gruß TomJava rocks!
How to become a good Java Programmer?
Does IT in Java and .Net
The only valid measurement of code quality: WTFs / minute
Blog
Xing
Twitter
Ähnliche Themen
-
Automatisches Einfügen von zu implementierenen Funktionen eines Interfaces
Von GartenUmgraben im Forum Coders TalkAntworten: 2Letzter Beitrag: 08.10.08, 15:55 -
steuerung eines Interfaces über usb
Von crafti5 im Forum .NET Application und Service DesignAntworten: 2Letzter Beitrag: 30.08.07, 07:13 -
Ansteuerung eines Interfaces über USB
Von crafti5 im Forum Visual Basic 6.0Antworten: 4Letzter Beitrag: 28.08.07, 13:31 -
Zwei Netzwerk-Interfaces & ein Standard GW?
Von jccTeq im Forum NetzwerkeAntworten: 7Letzter Beitrag: 14.04.05, 06:21 -
Hilfe finde keine blaupausen eines mustang
Von twszocker2k im Forum Cinema 4DAntworten: 3Letzter Beitrag: 21.12.04, 17:59






Zitieren
Login





