问题
I want to use the log4j API in my eclipse4 RCP (Kepler).
- Created a new Project "Plug-in from Existing JAR Archives". I added the log4j.jar with the help of the wizard.
- 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.
- In the plugin where I want to use the login functionallity I added the new plugin as dependency.
- 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