code: public static String lookup() throws Exception {
      if(jerryParser == null) {
        jerryParser = Jerry.jerry().enableHtmlMode();
        jerryParser.getDOMBuilder().setCaseSensitive(false);
        jerryParser.getDOMBuilder().setParseSpecialTagsAsCdata(true);
        jerryParser.getDOMBuilder().setSelfCloseVoidTags(false);
        jerryParser.getDOMBuilder().setConditionalCommentExpression(null);
        jerryParser.getDOMBuilder().setEnableConditionalComments(false);
        jerryParser.getDOMBuilder().setImpliedEndTags(false);
        jerryParser.getDOMBuilder().setIgnoreComments(true);
      }
      HttpClient client = HttpClients.custom()
          .setDefaultSocketConfig(SocketConfig.custom().setSoReuseAddress(true).build())
          .setUserAgent("Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0")
          .build();
      HttpGet get = new HttpGet("http://www.whatismyip.com/");
      
      HttpResponse response = null;
      String ipAddress = null;
      try {
        response = client.execute(get);
        if(response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
          ipAddress = EntityUtils.toString(response.getEntity());
          try {
            Jerry html = jerryParser.parse(ipAddress);
            Jerry ipNode = html.$("#greenip");
            if(ipNode.length() == 1) {
              ipAddress = ipNode.text();
            } else {
              ipAddress = null;
            }
          } catch(Throwable t) {
            ipAddress = null;
          }
        } else {
          EntityUtils.consume(response.getEntity());
        }
      } finally {
        get.releaseConnection();
        if(response != null) {
          try {
            ((CloseableHttpResponse)response).close();
          } catch(Throwable t){}
        }
        if (client != null) {
          try {
            ((CloseableHttpClient) client).close();
          } catch (Throwable t) {
          }
        }
      }
      return ipAddress;
    }
docs: Looks up the external ip address of the machine that this vm is running on.
  
  @return
  @throws Exception