I'm doing the same thing. Looks something like this:
Code:
Configuration bannerConfig = new Configuration();
SessionFactory sessionFactory;
sessionFactory = bannerConfig.configure("/hibernate-banner.cfg.xml").buildSessionFactory();
minus the exception handling, of course. The file is, in this case, located at the root of the jar. In other words, if the jar contained the class com.lutrosis.SomeClass, the paths would look like:
Code:
jarfile.jar/com/lutrosis/SomeClass
jarfile.jar/hibernate-banner.cfg.xml