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



Bill Janssen wrote:

>> HostName and LocalHostName are DNS names, while ComputerName is not.
>
>So, is the result of /bin/hostname related to any of these?

Are you looking for a correlation between setting the hostname with the
hostname command and setting or getting it with scutil?  If so, for what
purpose: what are you trying to do?

When you run 'hostname' and compare its output to 'scutil --get
LocalHostName' and 'scutil --get HostName', you will see some differences.
Likewise when you set the name with the setters.  You should just try it
and see what happens.

When I run the setters, they don't appear to affect one another, but I
didn't do a reboot to see which value has precedence at boot.  The Bonjour
name DOES change when LocalHostName is set, and it changes dynamically.  I
used Tildesoft's free Bonjour Browser utility to observe this in real-time.

Depending on what you're trying to do, one could deduce a further
correlation, at least when booting.  But if you really want to know EXACTLY
what each one is doing, you would probably have to dig into the Darwin
source.

  -- GG


 _______________________________________________
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



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.