public static String getAbsoluteURL(String baseURI, String relativePath) {String abURL = null;try {URI base = new URI(baseURI);// 基本网页URIURI abs = base.resolve(relativePath);// 解析于上述网页的相对URL,得到绝对URIURL absURL = abs.toURL();// 转成URLabURL = absURL.toString();} catch (MalformedURLException e) {e.printStackTrace();} catch (URISyntaxException e) {e.printStackTrace();} finally {return abURL;}}