OSGi got FrameworkFactory could not be instantiated Error
I am trying to use OSGi and maven to develop an standard alone application. I have the following osgi dependency in pom.xml <dependency> <groupId>org.osgi</groupId> <artifactId>org.osgi.core</artifactId> <version>6.0.0</version> </dependency> I tried the following code import org.osgi.framework.launch.FrameworkFactory; FrameworkFactory frameworkFactory = ServiceLoader.load(FrameworkFactory.class).iterator().next(); and got this error message Exception in thread "main" java.util.ServiceConfigurationError: org.osgi.framework.launch.FrameworkFactory: Provider org.osgi.framework.launch