fc.setVisible(true); fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); int i = fc.showOpenDialog(this); if (i == JFileChooser.APPROVE_OPTION) { try { session.fileDir = fc.getCurrentDirectory().getCanonicalPath(); System.out.println("Processing "+session.fileDir+", this will take some time, depending on the amount of images in the folder..."); System.out.println(fc.getSelectedFiles().length);