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:

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

What language will mobile phone apps be written in, in the near future?

Given that Hecl is very much tied to the Java ME platform, this question is pretty important to me. I was thinking about simply posting it here, on my line journal, but having recently started reading The Wisdom of Crowds, I decided to have a little fun with it, and created a “prediction market” on the Inkling Markets (a YCombinator startup) web site:

Of course, if you just want to comment on your answer, that’s ok too. My thoughts on the current possibilities:

  • Java ME. Widely available right now, but Sun has made a few false steps. For instance, the difficulty of writing something that runs everywhere is a high barrier for hobbyists or small companies.

  • JavaFX. Apparently, this exists because Java is seen as being not quite scripty enough to compete with dynamic languages, something that I think is a legitimate concern. However, it currently is not deployed, so it’s hard to say what its future will be.

  • Web/Javascript. If mobile phones get better/cheaper connections, it would be easy to see them going the way of the rest of the world – rather than native applications, they’d simply be html/javascript apps. Doesn’t work for games and some other things, but makes deployment very easy. The big if is the network operators and what they want to do about traffic costs. Apple, for the moment, seems to be taking this route.

  • Python. Currently available for Symbian. I don’t see it as a big possibility, but who knows.

  • Qt. Troll tech is currently shipping a development device, the “green phone”. Since it’s proprietary, this one seems like a long shot too, but you never know.

  • Other. GTK on Linux, Tcl/Tk… maybe even Hecl! In this field, things can be tilted upside down surprisingly quickly, although that’s not quite so true for anything involving physical devices.

  • None. Java ME becomes less popular, but nothing concrete supplants it, and we end up with a hodge podge of technologies, with no clear leader.

In any case, I think it’s a space that’s bound to be very interesting, and loaded with interesting possibilities.

Update user jsjenkins points out a silly oversight on my part: Flash Lite. It slipped my mind completely, but is certainly an important player in this market. The Java folks have to be hoping that history will not repeat itself.