How to let hibernate know where to look for configuration file
I just export my java project to executable jar. I have somehow made my project work to access value from DB (hibernate.cfg.xml), config.properties, and log4j.properties & editable for future...
I want to put hibernate.cf.xml, config.properties and log4j.properties in the outside of jar and place them somewhere in other directory...
when I run my jar
java -cp coreservice.jar;/mon/properties id.co.bni.coreservice.controller.CoreServiceController
I got this error
Could not find or load main class
Any help will be pleasure ~ :)
Re: How to let hibernate know where to look for configuration file
You can just give the full absolute path name for the hibernate config file in the java code.
And while running the program you need to set the classpath settings appropriately so that you will not get "CLASS NOT FOUND" exceptions.