1
我正在尝试使用ini4j。但我无法读取文件。代码:ini4j读取文件错误
ini = new Wini(new InputStreamReader(new FileInputStream("./setup.ini"), "UTF-8"));
但它给我的错误:
Unhandled exception type IOException
Unhandled exception type InvalidFileFormatException
Unhandled exception type UnsupportedEncodingException
Unhandled exception type FileNotFoundException
我已经尝试过 “C:\ setup.ini的” 和 “的setup.ini” 和“C:/setup.ini “ 我也试过:
ini = new Wini(new InputStreamReader(new FileInputStream(New File("./setup.ini")), "UTF-8"));
的变量INI正确声明:
Wini ini;
任何想法?
谢谢!缺少的try catch块是主要问题! –