title: Need to identify local machine somehow in java
body: <p>I'm trying to find out the name of the local machine (or some other way of uniquely identifying a particular machine) that an application is running on.</p>
  
  <p>I've been using this:</p>
  
  <pre><code>String hostname = java.net.InetAddress.getLocalHost().getHostName();
  </code></pre>
  
  <p>which works fine, but I just happened to notice in the profiler that it's taking quite a bit of time to execute that so I was wondering if there was something functionally similar that ran more quickly.</p>
  
  <p>Doesn't have to be host name, could be anything as long as it uniquely identifies the machine.</p>