问题
I'm working on osgi application which uses com.ibm.ws.admin.client_8.5.0.jar because I need to use WebSphere with JMX.
When I import as dependency this jar I get error in bundle activators:
public abstract class AbstractServiceTracker implements ServiceTrackerCustomizer<Object, Object> {
...
private ServiceTracker<Object, Object> tracker = new ServiceTracker<>(bc, bc.createFilter(builder.toString()), this);
I get error in Netbeans type ServiceTrackerCustomizer does not take parameters
and cannot infer type arguments for ServiceTracker<>
i suppose that this is a classpath issue. When i remove com.ibm.ws.admin.client_8.5.0.jar it's working fine. In this case what are the options to solve this problem?
来源:https://stackoverflow.com/questions/34466700/type-org-osgi-util-tracker-servicetrackercustomizer-does-not-take-parameters