I checked MR3 JAMS support file:// protocol to install a midlet. but it seems they don't provide function to allow user access a directory. Does somebody know if the protocol file:// support browser a directory?
To access anything in the device file system via file:// protocol, JSR-75 FileConnection is used. The JSR is able to restrict file system access, i.e. not show the entire directory structure to Java applications. Typically, the first thing a MIDlet should do before attempting to access any directory (after verifying that JSR-75 is present), is a call to javax.microedition.io.file.FileSystemRegistry.listRoots(), which tells what virtual file system roots are accessible to the application. For an example of FileConnection usage, you can check the FileBrowser MIDlet in PDAPDemo suite from Sun Java Wireless Toolkit (version 2.5.2 is available at http://java.sun.com/products/sjwtoolkit/download.html).
For more details on the FileConnection API, please see the specification at http://www.jcp.org/en/jsr/detail?id=75
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Participation.
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.