【发布时间】:2017-05-23 23:05:28
【问题描述】:
我的代码如下:
package org.minuteware.jgun;
import org.apache.commons.configuration.*;
class ConfigReader {
public void getconfig() {
Configuration config;
try {
config = new PropertiesConfiguration("gun.conf");
} catch (ConfigurationException e) {
e.printStackTrace();
}
String day = config.getString("sync_overlays");
System.out.println(day);
}
}
Eclipse 对这段代码有两个问题:
- 对于
package org.minuteware.jgun;行,它显示The type org.apache.commons.lang.exception.NestableException cannot be resolved. It is indirectly referenced from required .class files - 对于
} catch (ConfigurationException e) {行,它显示No exception of type ConfigurationException can be thrown; an exception type must be a subclass of Throwable
我找到了ConfigurationException in Java?,但那里提供的解决方案没有帮助。
【问题讨论】:
标签: java configuration