I have been trying to use java to acquire the hardware (MAC) address of a network card using the NetworkInterface class and I am experiencing different behaviour depending on whether or not java is running in a 64 bit browser or a 32 bit browser.

For example in one case under Windows 7, the 64 bit version returns the required information, but the 32 bit version does not. It only seems to be the getHardwareAddress() call that is affected as all the other methods in the class return identical information for both architectures.

Has anybody experienced similar problems or does anyone know of any possible solution?

Output from code below:

64 bit -

*** Interface [net4] ***
display name : USB Wireless 802.11 b/g Adaptor
MTU : 1500
loopback : false
point to point: false
up : true
virtual : false
multicast : true
HW address : 70 1A 04 37 D1 3C

32 bit -

*** Interface [net4] ***
display name : USB Wireless 802.11 b/g Adaptor
MTU : 1500
loopback : false
point to point: false
up : true
virtual : false
multicast : true
HW address : n/a