0
我的代码的一些代码片段如下所示;类路径错误
String log4jConfigPath = FileUtil.getFilePathFromClasspath("log4j.properties");
if (null != log4jConfigPath) {
PropertyConfigurator.configureAndWatch(log4jConfigPath);
} else {
logger.warn("log4j.properties not found on classpath!");
}
Config config = Config.getConfig("crawler.properties");
String mode = config.getString("crawler.mode").toLowerCase();
我为得到一个错误的两个文件“log4j.properties”和“crawler.properties”不上课path..i发现有居住在此文件夹中的文件我projects..Can有人告诉我如何将此文件添加到类路径编译器查找这两个属性文件。
谢谢;
这些文件在哪些文件夹中?他们应该从外观的默认包装中。 – 2011-05-18 05:44:10
嗨我把所有的文件移动到默认包....它现在不显示错误... thnks – arien 2011-05-18 06:36:14