Using a resource connection (jdbc:hsqldb:res: ) you can easily distibute your database as a single zip-file but because the file must be added to the classpath it is limited. Since you can't change the system class loader (without hack, http://forums.sun.com/thread.jspa?threadID=300557) you can't add or change the file att runtime. But you can change the thread context class loader.
So I suggest that you first try to load the resource using
. If that fails, try to load the resource from the context classloader,
The optimal solution would be to create a new type of connection (jdbc:hsqldb:zip: ) but that is a bigger task to do.
I have changed the code as suggested. Please check with the code in svn /base/trunk
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.