Wednesday, June 07, 2006

J2ME: Golden bug

I have exactly 13 days to release my company's app (and the other company's app too). After playing around with the look-n-feel, and running it hard to slim down the JAR file size, I finally got to look at the part that reads from the mobile phone's filesystem. At first, the bug's behavior is hardly noticeable underneath all those J2ME midlet permission pop-ups (one for every file listed).

On most Java MIDP2.0 phones supporting JSR-75 (FileConnection API), the following call should return the directory names requested:
should return
"file:///c:/pictures/"(or something equivalent applicable to the handset make).
Similarly other getProperty calls to "fileconn.dir.tones", "fileconn.dir.videos", should return ringtones' and videos' respective folders.

On Sony Ericsson's models K750, W800 series and possibly its entire Java Platform 6 family, this call fails—returns nothing basically. The root cause of this was simple:

“” has accidentally been misspelled as “” in those phones' Java API implementation.

Link here

Many programmers, especially those new to J2ME, spent countless hours of near despair wondering what on earth happened, or did not happen, on that tiny machine. Despair no more!


Bravo said...


Good to hear you are well and doing well with your projects issues.

Persevere and stay focus, two more weeks to your goal;) Will say a prayer for you too tonight.

PS: Will I need to update my Sony Ericsson's K750i software to settle this bug?

Antonia said...

Thanks! It's been going on fine, ahead of schedule, thanks to 16-hour days...

As for your K750i, only first releases are affected. Your phone probably isn't even affected. And you need not update anything. Besides, it's the job of the app maker to make sure the app works on your phone, no matter how much s/he may gripe about it.