import javax.microedition.io.file.*; import javax.microedition.io.*; import java.util.*; public class FileBrowser { String[] arr; public String[] getList(String path, String filter){ String[] arr = {"Error"}; try { FileConnection fc=(FileConnection)Connector.open(path); Vector v = new Vector(); boolean isIncludeHidden=false; Enumeration e =fc.list(filter ,isIncludeHidden); while(e.hasMoreElements()){ v.addElement((String)e.nextElement()); } v.copyInto(arr); } catch (Exception e){} return arr; } }