Hello I am creating a desktop application using Javafx ,embedded h2 database and hibernate for making connection between them. My application running well in my desktop but while i am running the executable jar file on other system it unable to fetch data from data base that means my db file is not embedded in application jar file. my database file resides in root directory .kindly tell me how can i put embedded h2 database file into that executable jar file or what change should i make in hibernate.cfg to put my test.h2.db file in app.jar.
My hibernate.cfg file is
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">org.h2.Driver</property>
<property name="hibernate.connection.url">jdbc:h2:~/test</property>
<property name="hibernate.connection.username">sa</property>
<property name="hibernate.connection.password"/>
<property name="hibernate.dialect">org.hibernate.dialect.H2Dialect</property>
<property name="current_session_context_class">thread</property>
<property name="cache.provider_class">
org.hibernate.cache.NoCacheProvider
</property>
<property name="hbm2ddl.auto">update</property>
<property name="show_sql">true</property>
<mapping class="model.Employee"/>
</session-factory>
</hibernate-configuration>