Monday, June 4, 2012

List root folders in J2ME/Blackberry

The following code list/check all the folders that existed in SD card, which is inserted in J2ME or Blackberry running OS. Please remember to import necessarily packages (in eclipse based, us Ctrl + Shift + O)

String root = null;
Enumeration e = FileSystemRegistry.listRoots();
while (e.hasMoreElements()) {
root = (String) e.nextElement(); // device has a microSD
        if (root.equalsIgnoreCase("store")) {
          System.out.println("okies man - store/ is available");
        } else {

1 comment:

  1. sorry for distrubing you but i just want to share the articel about J2ME
    let's check this link :
    i wish that article can be usefull