为什么我引用htmlunit的代码包,就会报错
1个回答
2016-09-05 · 知道合伙人互联网行家
护肤达人IT宅族
知道合伙人互联网行家
向TA提问 私信TA
知道合伙人互联网行家
采纳数:5637
获赞数:17441
毕业于曲阜师范大学,学士学位。互联网行业2年从业经验,读过SEO相关书籍。现任爱家网SEO优化专员。
向TA提问 私信TA
关注
展开全部
package htmlunit;
import java.io.IOException;
import java.net.MalformedURLException;
import org.htmlparser.visitors.HtmlPage;
import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException;
import com.gargoylesoftware.htmlunit.WebClient;
public class WebClientTest {
public static void main(String args[]){
final WebClient webClient = new WebClient();
HtmlPage page;
try {
page = webClient.getPage fo");
System.out.println(page.toString());
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
webClient.closeAllWindows();
}
}
import java.io.IOException;
import java.net.MalformedURLException;
import org.htmlparser.visitors.HtmlPage;
import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException;
import com.gargoylesoftware.htmlunit.WebClient;
public class WebClientTest {
public static void main(String args[]){
final WebClient webClient = new WebClient();
HtmlPage page;
try {
page = webClient.getPage fo");
System.out.println(page.toString());
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
webClient.closeAllWindows();
}
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询