我有一个网址:URL url=new URL("http://www.abc.com/aa/bb/cc/file.html"); 和相对路径:String relativePath="../file2.html"; //maybe is "/file3.html" 我想使用变量http://www.abc.com/aa/bb/file2.html和url获取relativePath怎么做? 最佳答案 new URL(url, relativePath);