- public void init() {
- ClassLoader classLoader = getClass().getClassLoader();
- File dir = new File(classLoader.getResource( "model").getFile());
- System.setProperty("CONFIG_HOME", dir.getParent());
+ public void init() throws Exception {
+ Path resourcePath = Paths.get(ClassLoader.getSystemResource("model").toURI());
+ Path parentPath = resourcePath.getParent();
+ System.setProperty("CONFIG_HOME", parentPath.toString());