I am using SWT's FileDialog to let user select several files:
FileDialog dlg = new FileDialog(s, SWT.MULTI);
dlg.setFilterPath(somePath);
String fn = dlg.open();
if (fn != null)
String [] files = dlg.getFileNames()
While fn
returns the absolute path to the directory, the files
array contains relative paths. I would like to get an absolute path for each file. Is there a way of doing this in Java that works across platforms (Win, Linux, MacOS)?