How can I get the absolute path of a directory using JFileChooser, just selecting the directory?
Try:
chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); File file = chooser.getSelectedFile(); String fullPath = file.getAbsolutePath(); System.out.println(fullPath);
fullPath gives you the required Absolute path of the Selected directory