JDBC support on J2ME

不打扰是莪最后的温柔 提交于 2020-01-11 11:55:49

问题


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


回答1:


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.




回答2:


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).



来源:https://stackoverflow.com/questions/4794770/jdbc-support-on-j2me

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!