摘要: 在启动RCP的插件中的start方法里:
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
Properties prop = new Properties();
try {
prop.load(Activator.class.getResourceAsStream("log4j.properties")); //$NON-NLS-1$
} catch (IOException e) {
// e.printStackTrace();
}
PropertyConfigurator.configure(prop);
}
阅读全文