JFileChooser filechooser = new JFileChooser();
filechooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
int returnValue = chooser.showOpenDialog(this);
if(returnValue == JFileChooser.APPROVE_OPTION) {
System.out.println("You chose to open this directory: " +
filechooser.getSelectedFile().getAbsolutePath());
this is the code i used to open a file
and get its path printed
but the thing is i want to get the path of a exe
file which means path should end up with the file extension at the end. with the current code it won't even show the exe files.