Using log4j in eclipse RCP doesn't work

心已入冬 提交于 2019-12-13 04:45:25

问题


I want to use the log4j API in my eclipse4 RCP (Kepler).

  1. Created a new Project "Plug-in from Existing JAR Archives". I added the log4j.jar with the help of the wizard.
  2. In the Manifest of the new plugin under runtime I made sure that the 3 packages "com.ibm.log4j", "com.ibm.log4j.helpers" and "com.ibm.log4j.net" are exported.
  3. In the plugin where I want to use the login functionallity I added the new plugin as dependency.
  4. When I try to use one of the classes e. g. the Logger class the only proposal is to import java.util.logging. Which means I'm unable to access the log4j API.

I have followed this thread very closely: How to use log4j in eclipse rcp I even watched the video multiple times to make sure I did nothing wrong. Still no success?

I really need some help here. I'm pretty close to just stuffing the jar file into every new plugin I add to my RCP.......

来源:https://stackoverflow.com/questions/20094097/using-log4j-in-eclipse-rcp-doesnt-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!