1
我正在處理Web應用程序,並且我在包com.xx.yy中創建了一個屬性文件。我需要從作者包com.aa.bb中的類中讀取此文件。我在使用FileInputStream讀取屬性文件時遇到問題
我有如下因素代碼:
try {
FileInputStream fileInputStream = new FileInputStream("com/xx/yy/myfile.properties");
internationalizationFile = new Properties();
internationalizationFile.load(fileInputStream);
fileInputStream.close();
} catch (Exception e) {
e.printStackTrace();
}
,但它不工作!
你會得到什麼?例外? –