Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting the computer name in pure java




On 26-Feb-08, at 21:57 , Andre-John Mas wrote:


On 26-Feb-08, at 15:39 , Thomas Baudel wrote:

Hi Mike, Greg and Bill, and thanks for the prompt answer: scutil is what I need.

To digress on your observations about my choice to tie a license- lock to the computer name:

This is a weighted design decision. I never saw anyone proceed this way, and perhaps I will have to revert in a few months
because of a flaw I hadn't thought about. But so far, I'm quite happy with it.


Here is the rationale:

I want to allow my users to migrate their licensed application transparently, should they upgrade to a new computer, reformat their hard drive, or even change the OS with which they run the application. And I publicize the transparency of this node-locking mechanism as a feature: the users can have confidence that nothing happens behind their back (such as network snooping or data stored in obscure places of the "registry/LIbrary"), and they know they'll get the paying features only as long as their computer keeps the name of their choosing.

Things change in a computer set up, and some more than others. A computer name should not
be assumed to be static. Solutions that I have seen around for what you are wanting to
do:
- license server
- using MAC address
- dongle


Each have their pros and cons. Some fail more frequently and some can be bypassed more
easily. Currently I see few solutions accessible to Java, in this regards, that can be
done without using some sort of native API.


Andre

Turns out that with Java 6 you can get the MAC address of a NetworkInterface:


http://java.sun.com/javase/6/docs/api/java/net/NetworkInterface.html

Though, given the state of Java 6 on the Mac, you are better off waiting
before going here.

Andre
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: Getting the computer name in pure java (From: Greg Guerin <email@hidden>)
 >Re: Getting the computer name in pure java (From: Bill Janssen <email@hidden>)
 >Re: Getting the computer name in pure java (From: Bill Janssen <email@hidden>)
 >Re: Getting the computer name in pure java (From: Thomas Baudel <email@hidden>)
 >Re: Getting the computer name in pure java (From: Andre-John Mas <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.