Hi knut,
Thanks for your answer, this seems a good solution. But in my case the
configuration is done in an xml file.
So as far as i know i cannot add java code into this file.

Thanks
Mike

On 1 Jun., 14:43, Knut Wannheden <[email protected]> wrote:
> Hi Michael
>
> This is what worked for me:
>
> String SCHEMA = "com/foo/product/default-schema.sql";
> CallableStatement initCall = connection.prepareCall("RUNSCRIPT FROM '"
> + MyClass.class.getClassLoader().getResource(SCHEMA).toString() +
> "'");
> initCall.execute();
>
> This allows me to have the schema inside the same Jar file as the
> MyClass class (which happens to be the class I run this piece of code
> in).
>
> Hope that helps
>
> --knut
>
>
>
>
>
>
>
> On Thu, May 31, 2012 at 2:16 PM, michael.nitschke <[email protected]> 
> wrote:
> > So i did some more experiments.
> > I tried to run it with classpath: without the quotes around it,.. even
> > worse.
> > I tried with out classpath and without the quotes around it, ... same
> > result as above.
> > It tried it with various levels of paths in quotes, but it allways
> > results in an FileNotFoundException.
>
> > Maybe i missed some thing, can any body point me in any direction?
> > Thanx.
> > Mike
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "H2 Database" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to 
> > [email protected].
> > For more options, visit this group 
> > athttp://groups.google.com/group/h2-database?hl=en.

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to