httpclient测试get post方法时报错Class not found com.xh.httpclient.HttpClientTest
Posted crazyerrrr
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了httpclient测试get post方法时报错Class not found com.xh.httpclient.HttpClientTest相关的知识,希望对你有一定的参考价值。
Class not found com.xh.httpclient.HttpClientTest java.lang.ClassNotFoundException: com.xh.httpclient.HttpClientTest at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClass(RemoteTestRunner.java:688) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClasses(RemoteTestRunner.java:421) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:444) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
原因:在运行portal工程时,使用了clean,导致报错。
方法:将HttpClientTest重新保存一下后运行就不会有错误了。
以上是关于httpclient测试get post方法时报错Class not found com.xh.httpclient.HttpClientTest的主要内容,如果未能解决你的问题,请参考以下文章
使用springmvc时报错JSPs only permit GET POST or HEAD
Android 项目使用 httpclient --> http.client (apache), post/get 方法