Hi,

The easiest way, and the solution usually used is to add the h2*.jar file
to the classpath for project 2 as well.

There are other ways, but it's more complicated. One is to embed the
h2*.jar file inside the test.jar file.

See also:

http://stackoverflow.com/questions/4443192/how-to-embed-h2-database-into-jar-file-delivered-to-the-client

Regards,
Thomas



On Tue, Apr 16, 2013 at 3:31 PM, sandhya <[email protected]> wrote:

> Hi All,
>
> I have one scenario like...
>
> Step 1: Created a project 1 with source code along with H2 Database ( Here
> there is no problem to access database)
>
> Step 2: Created the above project as a test.jar file
>
> Step 3: Added the test.jar file as a library (to the build path) to
> Project 2
>
> Step 4: When i am trying to call  testmethod()(This method establish
> connection with database)  avaialble in  class1 of  Project 1 not able to
> get connection reference.
>
>
>
> Please help me out how can refer a database that is embeddd in a jar file?
>
>
> Thanks in advance.
>
>
> Sandhya....
>
>  --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/h2-database?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

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


Reply via email to