URI url = DynamicTask.class.getClassLoader().getResource("spring-mvc-timeTask.xml").toURI(); File file = new File(url.getPath());