我在 karaf 的部署文件夹中部署 httpclient-4.3.4.jar。在终端中,当我使用命令 find-class HttpClients 时,没有列出任何内容。当使用关键字 find-class HttpClient 时,我只为 httpclient 包加载了以下类。由于缺少某些类,我在我的一个依赖包中得到了 java.lang.NoClassDefFoundError: org/apache/http/impl/client/HttpClients 。
我需要知道为什么有些课程不可用。如果是我们自己的包,我们可以指定导入和导出来控制我们需要公开的类。但是对于外部罐子,为什么会发生这种情况?
httpclient (202) org/apache/http/HttpClientConnection.class org/apache/http/client/HttpClient.class org/apache/http/client/params/HttpClientParams.class org/apache/http/client/utils/HttpClientUtils.class org/apache/http/impl/AbstractHttpClientConnection.class org/apache/http/impl/DefaultHttpClientConnection.class org/apache/http/impl/SocketHttpClientConnection.class org/apache/http/impl/client/AbstractHttpClient.class org/apache/ http/impl/client/AutoRetryHttpClient.class org/apache/http/impl/client/ContentEncodingHttpClient.class org/apache/http/impl/client/DecompressingHttpClient.class org/apache/http/impl/client/DefaultHttpClient.class org/ apache/http/impl/client/SystemDefaultHttpClient.class