By user13377336 on 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.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>
<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.