FileDialog fc=new FileDialog (new Frame(),"Test File Dialog");
fc.setVisible(true);
String selectedFile=fc.getFile();
File file = new File(selectedFile);
String absolutepath = file.getAbsolutePath();
hi, am trying to get the full file path of a text file. the file is in a different folder outside my java project folder but on the same drive. when i try to open it with the above code, am getting the correct file name in SelectedFile but file.getAbsolutePath() is doesnot return the correct file location. file.getAbsolutePath() is returning my java project's folder.
Please help me get the correct file location for any file i select in the File Dialogue