File loading by getClass().getResource()
I have followed the way of loading the resource file by using getClass.getResource(path) . The snippet of code is here : String url = "Test.properties"; System.out.println("Before printing paths.."); System.out.println("Path2: "+ getClass().getResource(url).getPath()); FileInputStream inputStream = new FileInputStream(new File(getClass().getResource(url).toURI())); i_propConfig.load(inputStream); inputStream.close(); I have configured it in eclipse with the hierarchy (Under source there is a folder called SwingDemo. In SwingDemo there is my java file as well as the resource file)... src