hibernate example

Simple hibernate program

This is

simple hibernate example

of desktop application .Add the hibernate jar  by creating new library named as hibernate and also add your database jdbc driver jar as external jar.
Also add the hibernate.cfg.xml file in your src folder.
Note hibernate.cfg.xml file should not be inside package.it should be in in parallel to packages.

The directory structure is shown below :-

dirstrsimple

hibernate.cfg.xml

 
User.java

 
MainClass.java

Download this example