 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Daniel Marzano Guest
|
Posted: Fri Nov 14, 2003 5:44 am Post subject: Opening hsqldb db files in 1.7.2. from jar file |
|
|
Hello,
From the hsqldb 1.7.2 readme.txt file:
FILES IN JAR
This option allows database files to be distributed in the
application jar. We have changed the original contribution so
that a special URL is used for this mode in the form of:
jdbc:hsqldb:res:<path in jar>
The URL type 'res' determines that the path that follows is a path
into the JAR.
Could someone give me an example of usage?
The jar file is located at M:/dmarzano/LucidPlayer.jar
I have tried various combinations of the url and have not had much luck, eg.
"jdbc:hsqldb:res:jar:file:/M:/dmarzano/LucidPlayer.jar!/spiders"
"jdbc:hsqldb:res:file:/M:/dmarzano/LucidPlayer.jar!/spiders"
"jdbc:hsqldb:res:jar:file:/M:/dmarzano/LucidPlayer.jar/spiders"
"jdbc:hsqldb:res:M:/dmarzano/LucidPlayer.jar!/spiders"
"jdbc:hsqldb:res:file:/M:/dmarzano/LucidPlayer.jar/spiders"
Thanks,
Daniel
|
|
| Back to top |
|
 |
Vasiliy Malakhov Guest
|
Posted: Fri Nov 14, 2003 9:11 pm Post subject: Re: Opening hsqldb db files in 1.7.2. from jar file |
|
|
Create a database and put the files in jar, like this:
[malakhov@midas-11 29]$ jar tf db.jar
META-INF/
META-INF/MANIFEST.MF
db/jardb.log
db/jardb.properties
db/jardb.script
[malakhov@midas-11 29]$
This jar should be in the classpath:
java -cp /usr/hsqldb/lib/hsqldb.jar:jardb.jar org.hsqldb.util.DatabaseManager
In this case the URL is
jdbc:hsqldb:res:/db/jardb
(path inside of the jar, not in the filesystem).
[email]D.Marzano (AT) cbit (DOT) uq.edu.au[/email] (Daniel Marzano) wrote in message news:<10dbe0de.0311132144.2ed50032 (AT) posting (DOT) google.com>...
| Quote: | Hello,
From the hsqldb 1.7.2 readme.txt file:
FILES IN JAR
This option allows database files to be distributed in the
application jar. We have changed the original contribution so
that a special URL is used for this mode in the form of:
jdbc:hsqldb:res:
The URL type 'res' determines that the path that follows is a path
into the JAR.
Could someone give me an example of usage?
The jar file is located at M:/dmarzano/LucidPlayer.jar
I have tried various combinations of the url and have not had much luck, eg.
"jdbc:hsqldb:res:jar:file:/M:/dmarzano/LucidPlayer.jar!/spiders"
"jdbc:hsqldb:res:file:/M:/dmarzano/LucidPlayer.jar!/spiders"
"jdbc:hsqldb:res:jar:file:/M:/dmarzano/LucidPlayer.jar/spiders"
"jdbc:hsqldb:res:M:/dmarzano/LucidPlayer.jar!/spiders"
"jdbc:hsqldb:res:file:/M:/dmarzano/LucidPlayer.jar/spiders"
Thanks,
Daniel
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|