File Selector for Java ME

I recently did some work to make Hecl read files, which also means that it can execute Hecl scripts from the phone’s memory. This is especially important for environments like Blackberry, where we will be distributing a signed version of the Hecl application. To create your own Hecl applications, instead of simply replacing the script in the .jar file, you can point to a script on the device’s file system. This is also available for normal Java ME phones, but unfortunately, for an open source project, the cost of a code signing certificate are prohibitive (on Blackberry, it’s only $20, so I bought one with my own money).

In any case, as part of this effort, I developed a very simple ‘file browser’, which is used in Hecl to select a script to execute.

The results are, like all of Hecl, available under an Apache license, which means that you can use it pretty much wherever you want:

http://github.com/davidw/hecl/blob/master/files/org/hecl/files/FileFinder.java

http://github.com/davidw/hecl/blob/master/files/org/hecl/files/FileFinderCallback.java

Of course, if you spot any ways to improve it or fix problems with it, I’d appreciate it if you sent patches back.

Leave a comment