HttpClient的使用依赖于Apache commons项目中的两个组件——commons-logging.jar、commons-codec.jar。所以要在Eclipse中添加外部Jar包 commons-logging.jar和commons-codec.jar。包括 HttpClient.jar已经都在eclipse的plugin里面了,不需要另外下载。
网上普遍讲的NoClassDefFoundError出错的原因是ClassPath没设好。
本文介绍如何在Eclipse中正确配置HttpClient依赖,避免NoClassDefFoundError错误。文中提到需要添加commons-logging.jar和commons-codec.jar这两个Jar包,并指出HttpClient.jar已包含在Eclipse插件中。
HttpClient的使用依赖于Apache commons项目中的两个组件——commons-logging.jar、commons-codec.jar。所以要在Eclipse中添加外部Jar包 commons-logging.jar和commons-codec.jar。包括 HttpClient.jar已经都在eclipse的plugin里面了,不需要另外下载。
网上普遍讲的NoClassDefFoundError出错的原因是ClassPath没设好。
1114
2289
19万+
1万+
6829

被折叠的 条评论
为什么被折叠?