为了更新我的.properties
文件,我使用 Apache Commons Configuration 的PropertiesConfiguration。但是当我使用代码时:
try {
PropertiesConfiguration properties = new PropertiesConfiguration("dao.properties");
} catch (ConfigurationException ex) {
}
我收到此错误:
incompatible types
required: java.lang.Throwable
found: org.apache.commons.configuration.ConfigurationException
这里出了什么问题?我第一次使用它。
PS:是否有任何相对等效或更好的库可供处理.properties
?