Name: bsC130419 Date: 06/14/2001
J2SE 1.4 beta documentation
Request
-------
Add NetworkInterface.getHardwareAddress()
This would return a byte array. Hardware addresses that don't fit into an even
number of bytes would be zero-padded. The actual contents of the byte array
would be undefined.
Rationale
---------
I use the hardware address of a machine's network interface as a hardware ID.
I use the hardware ID to machine-lock my software--something that Java
programmers will care about when they actually start writing commercial
software.
Currently, I do this by exec'ing an ipconfig/all or an ifconfig and parsing--
truly revolting, not to mention platform-specific.
Commentary
----------
Directly addressing the underlying issue (generating a hardware ID) might yield
a better solution. However, my solution is quick, and only mildly dirty.
Someone who understands network interfaces better than me might be able to
suggest a higher-level object for getHardwareAddress() to return.
(Review ID: 126591)
======================================================================