-1

I want to add jdbc.jar drivers in Apache Felix. For now the only solution that I found is to embed the jar files.

Is it possible to paste all jdbc jars in folder and include this folder in Java classpath?

Peter Penzov
  • 1,126
  • 134
  • 430
  • 808

2 Answers2

2

You can use your own starter for felix, add the jars to the class path and then export all packages as system packages using the framework property org.osgi.framework.system.packages.extra.

If you are talking about jdbc drivers then this is not really recommended though. Take a look at the pax-jdbc project. It allows to cleanly install and use jdbc drivers for many databases.

Christian Schneider
  • 19,420
  • 2
  • 39
  • 64
  • Can you give some more information about the first option, please? – Peter Penzov Jan 12 '16 at 08:56
  • Check this page http://felix.apache.org/documentation/subprojects/apache-felix-framework/apache-felix-framework-launching-and-embedding.html . It explains how the standard launcher looks like. It should be easy to use this for your own one. – Christian Schneider Jan 12 '16 at 14:05
0

You can add your JARs to Felix'es installation path into lib, lib/boot, or lib/ext directories. See README files inside those directories to see which one suits best.

Petr Gladkikh
  • 1,906
  • 2
  • 18
  • 31