Pages Navigation Menu

Coding is much easier than you think

Hibernate Installation/Setup on Eclipse IDE

Hibernate Logo
In our previous tutorial we got introduced to what hibernate is, and its advantage and disadvantage. In this tutorial you will learn how to install Hibernate and other associated packages to setup an environment for the Hibernate applications.

Environment Used

  • JDK 7 (Java SE 7)
  • Eclipse JUNO IDE
  • Hibernate jars
  • Any RDMS Database(Oracle 10 g in this example)


Setting up development environment

To install Eclipse IDE read this page

Downloading Hibernate

Hibernate Framework is available for downloading straight from its official site. The latest version of this framework for this day is 4.3.8
Simply go to
Choose Stable-4.3.8 final Download option as shown on the picture below:
Once downloaded Unzip the archive files.
Now Create a new Java Project(File -> New -> Java Project) and enter Hibernate4HelloWorld as project name. Create lib sub directory in this project.
Copy all 10 jar files Under lib/required directory of the hibernate distribution that you have downloaded to the lib directory of the “Hibernate4HelloWorld” project.
Those 10 jars are


These are the main jar files to run hibernate related programming,
Additionally, you will need the database driver JAR that Hibernate uses to connect to your database. I use Oracle Express Edition(Oracle XE) and it’s database driver jar is here on Windows:
Copy this ojdbc14.jar to the lib directory of the “Hibernate4HelloWorld” project.
Note: if you have another database management system already installed, then you should replace this database driver JAR with a different database driver JAR. For example, you must download MySQL Connector/J (official JDBC driver for MySQL) from if your database is MySQL.
Now I will create a User library on Eclipse IDE. Then, I will add all JAR files in the Hibernate4HelloWorld\lib directory to this User library and add this User library to the project build path.
Click Project–>Properties on the top menu bar of Eclipse.
User Library
Click Java Build Path–>Add Libraries.
Add library
Then, select “User Library” and click Next button.
User Library2
Then click on User Library button
User Library3
Now in the below screen click New button then enter “Hibernate” as the User library name.
User Library4
Select “Hibernate” User library that we just created and click Add External JARS… button.
User Lib
Select all JAR files in the lib folder of the “Hibernate4HelloWorld” project and click Open button to add all JAR files to “Hibernate” User library. Now “Hibernate” User library is ready and now click on ok.
Add external jars
Finally, select “Hibernate” User library and click Finish button.
User Library5
After adding “Hibernate” User library to “Hibernate4HelloWorld” project, it will look like this:
Hibernet Project structure
In our next article we will learn about Simple Hibernate Application Requirements using Annotation as well as XML Mapping


  1. How to retrieve the data from mysql db???

Leave a Comment

Your email address will not be published. Required fields are marked *