JavaDB on JavaME platform
Friday May 25, 2007
As the consumer devices get more sophisticated, more complicated applications will run on devices and there will be greater need to manage the application data. The need for running database engine on small devices will thus be very critical.
JavaDB, a cost effective, easy to use, fully featured, pure Java database with a very small footprint (2MB), looks very promising on small devices. I tried running it on the latest phoneME advanced (JavaME CDC) platform and could not resist the excitement of putting the details together in this blog. The procedure is very straight forward.
Prepare your setup as below,
1. Get the latest phoneME advanced platform. Currently, it is supported only on Linux-x86 platform.
2.Get the latest JavaDB release.
3. You also need the JDBC Optional package library for CDC platform. It can be built from the source using the step by step instructions.
<CDC_HOME> /bin/cvm -Xbootclasspath/a:<JDBC_OP>/foundation_jdbc.jar -cp <JAVADB_HOME>/lib/derby.jar: <JAVADB_HOME>/lib/derbytools.jar -Dij.dataSource=org.apache.derby.jdbc.EmbeddedSimpleDataSource -Dij.dataSource.databaseName=sample -Dij.dataSource.createDatabase=create org.apache.derby.tools.ij
ij> create table t (id int not null, addr varchar(20));
0 rows inserted/updated/deleted
ij> insert into t values (1, 'PlanetSun');
1 row inserted/updated/deleted
ij> select * from t;
ID |ADDR
--------------------------------
1 |PlanetSun
1 row selected
ij> exit;











Ca...
You can use OpenBaseMovil, which has an on-de...