【发布时间】:2013-08-15 07:40:31
【问题描述】:
尝试了一切,但解决方案,我添加到 buildpath,通过 manifest.mf 导入,但我不断收到此异常。 在构建路径中:commons-codec-1.8.jar、commons-logging-1.1.1.jar、httpclient-4.2.5.jar、httpcore-4.2.4.jar。我尝试使用 httpmime-4.0.1 和 selenium-server-standalone-2.0b3.jar,但我不断收到此异常。
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/http/httpEntity
at autorun.Main.main<Main.java:101>
Caused by: java.lang.ClassNotFoundException: org.apache.http.HttpEntity
at java.net.URLClassLoader$1.run<Unknown Source>
at java.net.URLClassLoader$1.run<Unknown Source>
at java.security.AccesController.doPrivileged<Native Method>
at java.net.URLClassLoader.findClass<Unknown Source>
at java.lang.ClassLoader.loadClass<Unknown Source>
at sun.misc.Launcher$AppClassLoader.loadClass<Unknown Source>
at java.lang.ClassLoader.loadClass<Unknown Source>
... 1 more
【问题讨论】:
-
构建路径 != 运行时类路径
-
@JigarJoshi 一般来说,是的,但是当您执行项目时,Eclipse 不会自动确保这些 JAR 位于运行时类路径中吗?
-
我没有在整个页面中看到日食(除了你的评论,现在在我的这个评论中)
-
@JigarJoshi 我可能对 Eclipse 独有的 buildpath 标签的使用了解太多。
标签: java apache http exception buildpath