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();
}
,但它不工作!
你会得到什么?例外? –