try { URL u = new URL("http", "www.poly.edu", 8000, "/fall97/grad.html#cs"); // work with the URL } catch (MalformedURLException e) {}