我的代码无法读取属性文件。这里有人能帮上忙吗?它打印无法找到文件。
BufferedReader br = null;
String strLine = "";
try {
br = new BufferedReader( new FileReader("C:/common-test/common-test/translationtest/messages_ja.property"));
while( (strLine = br.readLine()) != null){
System.out.println(strLine);
}
} catch (FileNotFoundException e) {
System.err.println("Unable to find the file: fileName");
} catch (IOException e) {
System.err.println("Unable to read the file: fileName");
}发布于 2016-02-23 01:24:15
尝试使用此\\
"C:\\common-test\\common-test\\translationtest\\messages_ja.property"您确定要使用.property还是.properties。
https://stackoverflow.com/questions/35559899
复制相似问题