HttpClient NoClassDefFoundError
我正在尝试从 HttpClient 4.0.1 运行示例应用程序。它是来自示例部分的文件 ClientMultiThreadedExecution.java。我把这些文件放在类路径中:;;;;;,文件编译正确。在运行时,我收到以下错误:apache-mime4j-0.6.jar
commons-codec-1.3.jar
commons-logging-1.1.1.jar
httpclient-4.0.1.jar
httpcore-4.0.1.jar
httpmime-4.0.1.jar
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/http/client/methods/HttpUriRequest
Caused by: java.lang.ClassNotFoundException: org.apache.http.client.methods.HttpUriRequest
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
我是否缺少参考?这似乎是一个类路径错误,但我无法确定要包含哪个jar文件?提前感谢您的帮助。