0

In a virtual machine environment, I can use sigar to get the virtual machine's mac address, but how to get mac address of the host?

Maroun
  • 94,125
  • 30
  • 188
  • 241

1 Answers1

0

try to use NetworkInterface, all is explain here : http://www.mkyong.com/java/how-to-get-mac-address-in-java/

Mathiewz
  • 189
  • 1
  • 12
  • this won't help to get it from host. – eis Nov 06 '13 at 09:35
  • oh, sorry, i didn't get the problem However, i think this is not possible to know the host's mac address because of java can't know if it is executed in a box – Mathiewz Nov 06 '13 at 09:54
  • yes, I agree. At least not in a trivial way which wouldn't need some "hacking". – eis Nov 06 '13 at 10:26