java - How get file path from property file and pass into the method as arguments -
in property file:
folderpath=c:\pre-configured/import.csv
in main class im passing path argument method load
properties pro = new properties(); new csv().load(con,"pro.folderpath", "validation");
but giving error as:
pro.getproperty(folderpath) (the system cannot find file specified.)
please in passing path method argument.
you need load properties file first:
filereader reader = new filereader( "your properties file path" ); properties prop2 = new properties(); prop2.load( reader ); prop2.list( system.out );