SQLite和J2ME [英] SQLite and J2ME

查看:61
本文介绍了SQLite和J2ME的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以将SQLite用于j2me应用程序? 有没有人尝试这样做?

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

推荐答案

SQLite不是用Java编写的,所以您要的是通过一些类似于JNI的接口使其成为非标准Java API.或将大多数SQLite源代码转换为纯Java代码,这些代码可能会使用JSR75文件连接进行存储.

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.

第一个解决方案等于在电话上的J2ME实现中添加新的JSR,如果您不是电话制造商或它的紧密合作伙伴之一,这通常非常困难,即使不是不可能.

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.

虽然我还没有查看源代码的特定部分,但我怀疑这是Android平台允许Java开发人员使用SQLite的方式.

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.

据我所知,第二个解决方案尚未实现(或至少尚未公开),因此要使它起作用,您将需要做大量工作.我会担心将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.

这篇关于SQLite和J2ME的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆