File file = new File(getClass().getResource(filePath + "/createFile.xml").toURI());
I get an error of java.lang.NullPointerException in above line. Here filePath is string variable in which I have set my directory path from where I want to read file.
new File(filePath+"/createFile.xml");?