Java tutorial
//package com.java2s; import java.io.File; import java.net.URI; public class Main { public static String[] getFolderFileNames(String aPath) { try { File thisFile = new File(aPath); return thisFile.list(); } catch (Exception exp) { System.out.println("Error listing file names: " + exp); } return null; } public static String[] getFolderFileNames(URI aPathURI) { try { File thisFile = new File(aPathURI); return thisFile.list(); } catch (Exception exp) { System.out.println("Error listing file names: " + exp); } return null; } }