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
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.
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).
精彩评论