閱讀屬性文件我下的resources/common/configure/
文件出現在Java
包創建屬性文件,然後我創建的代碼
Properties prop = new Properties();
try {
//load a properties file
prop.load(new FileInputStream("resources/common/configure/commonData.properties"));
//get the property value and print it out
System.out.println(prop.getProperty("id"));
} catch (IOException ex) {
ex.printStackTrace();
}
,但我得到了以下錯誤
java.io.FileNotFoundException: (The system cannot find the path specified)
請讓我知道如何獲得這個屬性文件。