This tutorial explain how to perform hibernate reverse engineering using eclipse.
First of all before we start you need to install Hibernate Plugin in Eclipse
Goto this link http://download.jboss.org/jbosstools/updates/development/kepler/
1). Now Open Eclipse IDE and go to Help -> Install New Software :
3). Then fill the form as shown in the picture below (You can put any name you like):
4). You can search hibernate Tool in typing text field. Then check the appropriate check boxes and then click the next button as shown in the picture below.
Accept the license and wait for the installion to finish. At some point you migh get a warning (very common when installing third party software on Eclipse). Just click OK and the installation will be continued:
When the installation is completed you will be asked to restart the IDE. When the IDE is up again you will notice the new Hibernate Perspective. If it doesn’t show up click the button in the left of the Java Perspective button :
Create new project with name HibGenerator
a). Generating the xml mapping classes from the database :
Here create a new project with name HibGenerator and package com.gen.main.

Here we require three jar files as shown in above image.
1.hibernate3.jar
2.javax.persistence.jar
3.mysql-connector-java-5.1.21-bin.jar /
Now open hibernate perspective Goto Window > Open Perspective > Other .. as shown in below image.
Select Hibernate.
Press Next and then press Finish button.
Press right click on project folder and create new file in project folderhibernate.reveng.xml as shown in below image.
then it generate Claasses with hibernate xml mappings
b). Generating the annotated classes from the database :
- You need hibernate-common-annotations.jar to generate annotations



then it generate Claasses with annotations.




