Hi,

> I'm writing an Java Application whit Hibernate-Jpa, and I'm using H2
> like a database.
> On my pc, run all correctly, but now, I want to build a jar file, in
> which I've the Java Application and the H2 db.

Do you want to include the H2 jar file inside your application jar
file, or the database file(s)?

If you want to include the H2 jar file, do you also want to include
the Hibernate jar files? If yes see http://one-jar.sourceforge.net/

If you want to include the database file, you can do that as long as
the database is read-only. Otherwise not. To do that, see
http://www.h2database.com/html/features.html#database_in_zip

> Are there other alternatives for building the application on a jar file?

Sorry, I don't understand this sentence...

> If there are, how can I edit my persistence.xml?
> In my localhost I use this line:
> <property name="hibernate.connection.url" value="jdbc:h2:src/db/
> cap_db;FILE_LOCK=NO"/>

Why do you use FILE_LOCK=NO? Using it will most likely lead to a
corrupt database.

Regards,
Thomas

-- 
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