tags:

views:

1347

answers:

2
+2  Q: 

SQLite and J2ME

is it possible to use SQLite for a j2me application ? has anyone ever tried to do so ?

A: 

Currently i think it's not possible to use SQLite in J2ME, since there is no officially supported API for SQLite, your only alternative is to use the RecordStore or maybe write directly in the file system.

tdelev
+2  A: 

SQLite is not written in Java so, what you're asking for is either making it available as a non-standard Java API, via some JNI-like interface or translating most of the SQLite source code into pure java code that would presumably use a JSR75 file connection for storage.

The first solution is tantamount to adding a new JSR to the J2ME implementation on the phone, which is usually very hard if not impossible if you're not the phone manufacturer or one of its close partners.

While I haven't looked at that specific part of the source code yet, I suspect this is how the Android platform allows Java developers to use SQLite.

As far as I know, the second solution hasn't been implemented yet (or at least it hasn't been made public) so would require quite some work on your part to make it work. I would be worried about the performance implications of moving SQLite to an interpreted language with very little control on file access performance.

QuickRecipesOnSymbianOS