title: Get IP address with URL string? (Java)
body: <p>In my program a user enters a url string, say </p>
  
  <p><a href="http://www.engineering.uiowa.edu/~hawkeng//fall01/graphics/potato.gif">http://www.engineering.uiowa.edu/~hawkeng//fall01/graphics/potato.gif</a></p>
  
  <p>how would I get the IP address of this url?  I tried using</p>
  
  <pre><code>InetAddress address = InetAddress.getByName(urlStr);
  </code></pre>
  
  <p>but the result always comes back null.  What is the proper way to get the IP address?</p>