If we were to assume that my data.h2.db is in my data.jar file which
is in my home directory:
So because a jar file is a zip, does that mean that:
ssConnection = new SSConnection("jdbc:h2:zip:~/
suppliers_and_parts.jar!/suppliers_and_parts", "sa", "");
should get me connected? Every time I've tried that it gives me a null
pointer exception because it is more than
likely looking for a .zip file. I've tried changing it to
"jdbc:h2:jar" and "jdbc:h2:file" but it gives me an exception
saying that it could not load properties.
Thanks for your help by the way.
On May 30, 11:44 am, Ryan How <
r...@exemail.com.au> wrote:
> I remember this coming up before a while ago (but I can't seem to find it).
>
> I think you have to get the path of the jar file and then open it in h2
> as you would a zip file, giving it the full path (or relative to the
> current working directory).
>
> So you have to use some classloader magic to get the jar file.
>
>
http://stackoverflow.com/questions/320542/how-to-get-the-path-of-a-ru...