The IT Alchemy Lab really doesn't have any set "purpose" to speak of. It is more about the IT technologies and issues I come across in my day-to-day business, meetings and chats (lunches, coffee and drinks) with my IT colleagues and friends.

Blog Archive

Sunday, April 20, 2008

Java DB Demo

The deed is done and the JavaDB demo is ready.
You can download the entire source package here.

Some things you will need.
1) Download the JavaDB (comes with JDK_1.6) from SUN's site here
Now, explode/install and copy derby.jar from the lib directory to the project lib directory.
OR you can simply point the ant file attribute CP.ROOT to your library directory
2) Grab ANT from the Apache group here
build the file from the ant folder by executing: build

To copy run the file, copy dist/javaDBDemo.jar to the root directory
> cp dist/javaDBDemo.jar .
> java -jar javaDBDemo.jar


Building and running:
Build the jar using the included ant script and execute the application with
java -jar javaDBDemo.jar
You can use the following arguements as well
java -jar javaDBDemo.jar [-b -t -s -p -h]
-b Build New Database (check first)
-t Clean and insert test data (depends on -b)
-s Execute a select using a dirty SQL
-p Execute a select using a prepared statement
-h Print Help Commands

Hope this helps, next on the list of demos: Creating a war file.

No comments:

About Me

My photo
Don't tell people how to do things, tell them what to do and let them surprise you with their results. --General George S. Patton
Open Source Links | Sourceforge | Slashdot | Open Source