Proper way to include log4j in an Eclipse 4 (RCP/SWT/OSGi) application

后端 未结 3 1687
走了就别回头了
走了就别回头了 2021-01-28 16:53

This is a follow-up (somehow of my Third-party dependencies to an OSGi application) where it was suggested that some libraries e.g. log4j are already available as bundl

3条回答
  •  深忆病人
    2021-01-28 17:03

    The fragment is one option to extend the log4j bundles classpath to include the required configuration file. It is probably the simplest way of configuring application wide properties.

    This is not meant to be altered after deployment though as it will be embedded within a jar file. You will have to come up with a different approach if you expect to make it configurable after deployment.

    NOTE: I am afraid you misunderstood the answer about the jars that are already available as bundles. This does not mean that they are part of your OSGi platform of choice (Indigo), only that they are ready to be deployed to an OSGi platform as is. Your creation of a plugin project was unnecessary, you simply needed to add the jar to your target platform to resolve your missing imports.

提交回复
热议问题