../../../../db.properties
../../../db.properties
../../db.properties
......
都试过了
就是不行,是不是file = new BufferedReader(new FileReader(strCount));
这个METHOD必须要写绝对路径啊?
(测试过:如果用下面这种方式读取db.properties,路径就是String strCount="/db.properties"; 而用new FileReader(strCount)就报错,有人告诉我为什么吗?)
还有:如何往db.properties写内容?
     String strCount="/db.properties";
     InputStream is = getClass().getResourceAsStream(strCount);
     Properties dbProps = new Properties();
     dbProps.setProperty("name_test","TEST");
是这样吗?可是写不进去啊?