i writing path of file
if (!new file(path).exists()) { url location = this.getclass().getclassloader().getresource(path); if (location == null) { location = thread.currentthread().getcontextclassloader().getresource(path); } path = location.getpath(); path = urldecoder.decode(path, "utf-8"); path = new file(path).getpath(); if (!new file(path).exists()) { throw new exception("unable resolve path: " + path); } } the same code working linux machine windows getting location = null , path=./../config/equipmenttemplates/ there.
Comments
Post a Comment