J2ME 上的 JDBC 支持
目前我正在尝试在 Windows Mobile 6.1 设备上运行现有的 java 应用程序。 java 应用程序是为服务器端开发的并使用 JDBC。我的问题是Java应用程序使用java.sql.DriverManager,J9运行时或任何CDLC/CDC实现都不支持它。
经过大量研究后,似乎没有一个标准的方法可以做到这一点。 JSR 169 也不支持此类。
所以,我想知道你们是否有类似的问题,以及是否必须提及任何基本上支持移动设备上的 java.sql.* 包的适当软件堆栈。似乎规范不支持这一点,唯一的方法基本上就是通过破解它......
提前致谢
Currently I am trying to run an existing java application on a Windows Mobile 6.1 device. The java application had been developed for server side and uses JDBC. My problem is that the Java application uses the java.sql.DriverManager which is not supported either by J9 runtime or by any CDLC/CDC implementation.
After doing a lot of research it seems that there is not a standard way to do that. The JSR 169 does not support this class as well.
So, I was wondering whether any of you have similar problems and if you have to mention any appropriate software stack that basically support the java.sql.* package on mobile devices. It seems that the specifications do not support this and the only way to do it is basically by hacking it up...
thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
对于基于 CLDC 的环境,没有正式的 JDBC 支持。对于基于 CDC 的环境,有一个 JDBC 可选包。
CLDC/MIDP 的数据库支持非常粗略。我看到这里有一个:
http://developer.mimer.com/platforms/productinfo_19.htm
但这可能不是您想要的。
我认为您需要做的是推出您自己的基于 Web 服务的系统,在其中与 Web 服务器中运行的 Java 代码进行交互,充当与数据库的 JDBC 通信的代理。
There is no official JDBC support for CLDC-based environments. There is a JDBC optional package for CDC-based environments.
Database support for CLDC/MIDP is very sketchy. I see there's one here:
http://developer.mimer.com/platforms/productinfo_19.htm
but that's probably not what you want.
I think what you'll have to do is roll your own web service based system where you interact with Java code running in a web server, acting as your proxy for JDBC communication to the database.
我不知道如何在这两种配置中使用 DriverManager。
如果您想使用 JDBC 而不需要太多工作,您可以切换到 DataSource 来获取连接。 (使用 JSR169 jar)。
I don't know how to use DriverManager in either configuration.
If you want to use JDBC without too much work, you can switch to DataSource to get your connections. (Using the JSR169 jar).