cfg.addFile(“Database_configuration_files/Delete.hbm.xml”) is working fine. when i am creating a runnable jar for the above code. I am getting this error " HHH000220: Reading mappings from file: Database_configuration_files\Delete.hbm.xml ".
Let me know if you need any additional information.
The addFile works with file paths that can be resolved on disk, not on the classpath. So, unless you are using an absolute file path, the program will run only when the relative path can be resolved from the calling command path.