10 2012 档案
摘要:http://www.iteye.com/topic/483115,这篇文章介绍的很详细。补充一下下关于log4j配置文件的读取方式。 InputStream is = GameServer.class.getResourceAsStream("/log4j.properties"); Properties p = new Properties(); p.load(is); PropertyConfigurator.configure(p);log4j.properties 是放在src的根目录下的。
阅读全文