Peter Penzov
Peter Penzov

Reputation: 1658

Configure classpath for external jars

I would like to configure external jars into java classpath. Is there any way to configure this into Apache Felix configuration file.

Upvotes: 0

Views: 1264

Answers (1)

Balazs Zsoldos
Balazs Zsoldos

Reputation: 6046

You can start felix with:

java -jar felix.jar

You can use add other jars to the classpath to this start command as for any other jars:

java -cp classpathJars -jar felix.jar

When you are done, you should visit the documentation of felix configuration: http://felix.apache.org/site/apache-felix-framework-configuration-properties.html

Check the documentation of the following property: org.osgi.framework.system.packages.extra

Notes.: We hav not had a project till now in which we had to do such trick. In case this is the only solution, you might want to think of:

  • Adding OSGi manifest headers to the jars and use them as OSGi bundles
  • Leaving that technology out from your stack

Upvotes: 2

Related Questions