background image

  } else {
   path = args[0];
  }
  File dir = new File(path);
  File files[] = dir.listFiles();
  for (int i = 0; i < files.length; i++) {
   File file = files[i];
   if (desktop.isSupported(Desktop.Action.OPEN)) {
    System.out.println("Opening... " + file.getName());
    try {
     desktop.open(file);
    } catch (IOException ioe) {
     System.err.println("Unable to open: " + file.getName());
    }
   }

  }
 }
}