public static void main(String args[]) {
String filePath = "/a.properties";
//writeProperties(filePath, "name", "wangmin");
System.out.println(ConfigInfo.readValue(filePath, "name1"));
}
报错:java.io.FileNotFoundException: \a.properties (系统找不到指定的文件。)
我的项目根目录下面有这个文件,这是怎么回事
String filePath = "/a.properties";
//writeProperties(filePath, "name", "wangmin");
System.out.println(ConfigInfo.readValue(filePath, "name1"));
}
报错:java.io.FileNotFoundException: \a.properties (系统找不到指定的文件。)
我的项目根目录下面有这个文件,这是怎么回事
改成String filePath = "../a.properties";
试试。
要是确实还是找不到,你就把该文件的路径弄详细点啊, A/B/../a.properties