Мне нужно добавить файл свойств в мое приложение. Я добавил этот файл в каталог controller
, но не могу загрузить их (нет в пути к классам?) - InputStream
имеет значение null. Куда обращаться с этим файлом?
public class Application extends Controller {
static {
try {
Properties p = new Properties();
InputStream in = Application.class.getClassLoader().getResourceAsStream("accounts.properties");
if(in != null) {
p.load(in);
in.close();
} else {
error("null inputstream");
}
} catch (Exception e) {
e.printStackTrace();
}
}
// Actions below
// ...
}