db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Leader <d.lea...@bio.gla.ac.uk>
Subject Including a derby db within the same jar as the application ( was Including a derby database in a Windows executable)
Date Fri, 26 Oct 2007 08:13:06 GMT
John Embretsen replied to my query about packaging a derby db in an  
exe file:

 > If your database is read-only, I guess you could put your database
 > in a jar (your application jar file) and the wrap the jar in an exe
 > file
 >

To my embarrassment, I wrote last night:

> I tried that last summer when we were first playing with derby, and I
> gave up as I was unable to find a path to the database.

and gave examples of my feeble attempts.

And then at breakfast this morning  I realized that perhaps I should  
reference the application jar file itself (for some reason that  
didn't seem right to me):

jdbc:derby:jar:(MyApp.jar)MyDB

That works a treat. (And, obviously, it's not Windows-specific - so I  
changed the subject again.)

Perhaps an example of this sort might be included in  a future update  
of the derby developer docs - others might want to package a db in an  
app.

Thanks again for all the help from list members.

David


Mime
View raw message