And*_*huk 17 java configuration
我的代码如下:
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);
}
}
Run Code Online (Sandbox Code Playgroud)
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我在Java中发现了ConfigurationException?,但提供的解决方案没有帮助.
Bal*_*usC 38
Apache Commons Configuration的核心具有以下运行时依赖性:
也可以将它们放在类路径中.您的特定问题是由缺少Lang依赖性引起的.
| 归档时间: |
|
| 查看次数: |
19978 次 |
| 最近记录: |