Hibernate XML Configuration file and application path
Posted on 2006-12-01
I am using firebird's embedded database(or trying to atleast) with my application. I want to be able to set the path to the database relative to my application for instance normally outside of hibernate i could do something like this:
String dir = System.getProperty("user.dir");
Connection con = null;
Driver d = (Driver)Class.forName( "org.firebirdsql.jdbc.FBDriver" ).newInstance();
con = DriverManager.getConnection("jdbc:firebirdsql:embedded:" +dir + "\\USERDB.FDB", "sysdba", "masterkey");
I can't figure out how i would get hibernate to recognize the working directory of the application in it's xml configuration file I would like to do something similar to below where %ApplicationDIR% would be the application directory. Is this possible?