I am learning OSGi follow this Apache Felix Tutorial, everything went on wheels until this example 5, I've been told that felix couldn't find the class org.osgi.util.tracker.ServiceTracker
. I copied all the exact code and the manifest meta data on the page, I'm totally confused, can someone help me with this?
ServiceTracker is part of OSGi core since version 5.0. That means that if you use an Apache Felix that already supports OSGi 5, the JAR will contain the class you are looking for.
If you want to have the class for compilation, you add the osgi-core 5 jar file the classpath of the compiler.