Wednesday May 23, 2007

Building JDBC for CDC/Foundation



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

I am planning to write a simple Makefile for linux-x86 platform which can be used with the JDBC Op package makefiles. Building the entire package will be just one 'make' command then. But, until I get there, this will be helpful, I believe.


 

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.
 

About

user13377336

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today
Bookmarks
Blogroll

No bookmarks in folder