My program get a filename in parameter but if i want to use it i need the full directory path or i get filenotfoundexception. For example: My program got sample.txt in parameter from C:\Users\me\documents.
File file = new File(args[0]);
FileReader fr = new FileReader(file);
That throw filenotfoundexception. So what should i use to locate the file? I saw so many similar question but i didnt find solution :( I tried to use getResources and getPath but nothing.