On 6 Jan 2006, at 05:51, Ian Joyner wrote:

Is it possible to find out the serial number of a server (OS X or Losedows) that a WO application is running on?

The reason I need to do this is to register an application for a customer to only run on one machine, so perhaps there are other ways, prewritten frameworks to do this.

Thanks
Ian

The traditional way of doing this on UNIX is look at the MAC address of the Ethernet device en0. This is no good to you as it won't work on Windows and, while Java provides eg java.net.NetworkInterface, this class doesn't provide API for returning the MAC address.

Serial numbers of computers, operating systems, bit of software? Not going to work well on both MacOSX[Server] or Windows, either. The MacOSX system call gethostid() was removed some time ago because of privacy concerns. Until recently, the WebObjects license key string ( /System/Library/Frameworks/JavaWebObjects.framework/Resources/ License.key ) might have been useful, but because of licensing changes, we should no longer expect this file's contents to be unique per machine.

If this is for one machine per customer, you can probably lock against the local network address; try java.net.InetAddress.getAllByName("localhost").


--
Patrick Middleton
OneStep Solutions plc
351 London Road             Phone: +44 (0)1702 426400
Hadleigh                    Fax:   +44 (0)1702 556855
Essex. SS7 2BT              Email: [EMAIL PROTECTED]
England                            (MIME welcome)

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to