Building JDBC for CDC/Foundation
Wednesday May 23, 2007
JDBC Optional Package for CDC/Foundation Profile was released back in 2004. This optional package is required on the CDC platform for any JDBC driver to work. As part of the Reference Implementation download, only source (and documentation) bundle was released. The intent here was that people who have ported CDC platform to their own platform of interest should be able to build JDBC Op Package from this source against the built binary.
The building instructions in the README file of the source bundle are some what vague and there was no clarity on this as CDC platform itself was not Generally Available. Recently, As part of the Open Source effort, mobile and embedded community was formed and CDC platform binaries (for Linux-x86 platform) are now easily available for download, as phoneME Advanced project. With this change, I believe it is more critical to have clarity around building this package.
The steps for Building JDBC Optional Package on phoneME Advanced platform are as below,
1. Download the JDBC Op Package source bundle from here.
2. Download the latest CDC Platform. Please note that currently, this platform is available only on Linux-x86. This means that you will need linux-x86 box to build JDBC Op package as per these instructions.
3. Prepare with JDK 1.4.2 binary. CDC Platform is compliant with JDK 1.4.x spec and so is the JDBC Op Package. You will need JDK 1.4.x 'javac' to build against the CDC.
4. Run following to build the JDBC Op Package.
4.1 cd
<JDBC_Source>/cdcfoundation/src/share/jdbc/classes
4.2 <JDK1.4.x>/bin/javac -bootclasspath <CDC_HOME> /lib/btclasses.zip:<CDC_HOME> /lib/basis.jar -d <pathtoclasses> java/sql/*.java
4.3 <JDK1.4.x>/bin/javac -bootclasspath <CDC_HOME> /lib/btclasses.zip:<CDC_HOME> /lib/basis.jar -d javax/sql/*.java
Here note that, CDC platform contains 'basis.jar' file, as this set of binaries support Personal Basis profile. if you have built your own CDC from the source bundle with profile 'foundation' or 'Personal Profile', you should replace 'basis.jar' file as 'foundation.jar' or 'personal.jar' respectively.
4.4 cd <pathtoclasses>
4.5<JDK1.4.x>/bin/jar cvf <JDBCOp>.jar java/sql/*.class javax/sql/*.class
added on May 25, 2007.
If you prefer building JDBC Op package along with CDC binary from its svn repository, then you need to add few lines to your makefiles as pointed out by Chris, here.
Tags: basis cdc databases foundation javame jdbc personal











Late comment, but since I just noticed this post.....
Probably I don't understand all your instruct...
Sorry to bother you but I've downloaded the CDC pr...
Edem: Run javac without arguments and you will see...
I...
@Tom: On Windows you need to separate the parts of...
For lazy people like me who do not want to downloa...