Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to get a net device's MAC Address?  RSS feed

 
Bekars
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to get a net device's MAC Address?
 
Harpartap Singh
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe reading that Java cannot access your network card's MAC address. Could the Java networking gurus could confirm this?
But if its worth anything, from the dark side...
GetAdaptersInfo().Address gives you the MAC address.
And of course you could parse the output
windows: ipconfig /all
unix: ifconfig -a
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!