wood burning stoves 2.0*
The moose likes JDBC and the fly likes Embedding Derby Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Embedding Derby" Watch "Embedding Derby" New topic
Author

Embedding Derby

Khp Virajith
Ranch Hand

Joined: May 01, 2006
Posts: 85
Hello,

I'm going to use Derby DB as the persistent store for a standalone application that I'm building. I haven't used Derby before and I came to know that Derby can be embedded into the java application itself. I want to know whether it's possible to use Derby without installing it manually and use it as a bundled database system in the same jar as my standalone application resides. If it's possible can anybody give some pointers on how to achieve it.

Cheers!
Virajith


SCJP, SCWCD, SCMAD, SCSNI
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38007
    
  22
There should be something about how to install Derby in the Java™ Tutorials.
Khp Virajith
Ranch Hand

Joined: May 01, 2006
Posts: 85
Hello Campbell,

Thank you for your reply and I've already found how to install Derby from it's official web site. My question is about whether that installation is required when using that Embedding technology. If I have to install derby before using my standalone application it's little bit painful as my application depends on the installation of the DB. Instead, What I want is to pack Derby system with my application and use Derby db without any manual installations & configurations. I read that there is a technique called "Embedding Derby" and I guess that embedding technique satisfies my requirement.

If anybody have done this, I invite them to help me on this.

Regards,
Virajith
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38007
    
  22
I don't use it myself, so I can't help any further. Sorry.

Anybody else?
Khp Virajith
Ranch Hand

Joined: May 01, 2006
Posts: 85
Hello Campbell,

It's ok Campbell. No worries! Your attempt to support is greatly appreciated. I did some experiments with derby and get proved that I can use Derby without explicitly installing it but embedding it into the application by putting the derby.jar into the class path.

Anybody else familiar with derby embedding? know further facts on that? If so, your ideas are really important for me to carry on explorations on Derby.

Cheers!
Virajith
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38007
    
  22
You seem to have had some measure of success. Well done.
Khp Virajith
Ranch Hand

Joined: May 01, 2006
Posts: 85
Hello,

Yes, of course! Thank you Campbell!

And anybody struggling with Derby (currently known as Java DB), Please checkout the "docs" directory of the Derby installation/zip distribution because it contains some reference manuals on Derby.

Cheers!
Virajith
 
jQuery in Action, 2nd edition
 
subject: Embedding Derby
 
Similar Threads
Establish Connectivity between Java and SQLite
Choosing Database to a Java Swing Standalone Application
Derby Embedded vs. Derby Network Server
using DBVisualizer with derby
Swing + Beans + Jboss (How to debug?)