1
喜我尝试使用后梅索德in this example使用apatche 4.0.1,但我得到HttpEntity ClassNotFound的异常HttpEntity ClassNotFound?
喜我尝试使用后梅索德in this example使用apatche 4.0.1,但我得到HttpEntity ClassNotFound的异常HttpEntity ClassNotFound?
你是不是correclty包括的HttpCore罐子到类路径。你是通过一些IDE,webapp或者只是应用程序来运行它吗?
编辑:根据您的评论。
ClassNotFoundException的:org.apache.commons.logging.LogFactory
那是你的罪魁祸首。我假设httpcore使用LogFactory,你没有将它包含在你的类路径中。寻找commons-logging.jar并将其包含在你的类路径中。
通过Eclipse IDE,我将Jar文件导入到项目中,当我在导入后编写它时,IDE会识别HttpEntity。 – Jimmy 2010-08-03 00:39:59
并且通过eclipse将它作为“Java应用程序”来运行? – 2010-08-03 00:45:20
是的,我运行它作为Java应用程序。 – Jimmy 2010-08-03 00:51:24