- Hibernate - Interceptors
- Hibernate - Batch Processing
- Hibernate - Caching
- Hibernate - Native SQL
- Hibernate - Criteria Queries
- Hibernate - Query Language
- Hibernate - Annotations
- Hibernate - O/R Mappings
- Hibernate - Examples
- Hibernate - Mapping Types
- Hibernate - Mapping Files
- Hibernate - Persistent Class
- Hibernate - Sessions
- Hibernate - Configuration
- Hibernate - Environment
- Hibernate - Architecture
- Hibernate - Overview
- ORM - Overview
- Hibernate - Home
Hibernate Useful Resources
- Hibernate - Discussion
- Hibernate - Useful Resources
- Hibernate - Quick Guide
- Hibernate - Questions and Answers
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Hibernate - Environment
This chapter explains how to install Hibernate and other associated packages to prepare an environment for the Hibernate apppcations. We will work with MySQL database to experiment with Hibernate examples, so make sure you already have a setup for MySQL database. For more detail on MySQL, you can check our
.Downloading Hibernate
It is assumed that you already have the latest version of Java installed on your system. Following are the simple steps to download and install Hibernate on your system −
Make a choice whether you want to install Hibernate on Windows, or Unix and then proceed to the next step to download .zip file for windows and .tz file for Unix.
Download the latest version of Hibernate from
.At the time of writing this tutorial, I downloaded hibernate-distribution3.6.4.Final and when you unzip the downloaded file, it will give you directory structure as shown in the following image
Instalpng Hibernate
Once you downloaded and unzipped the latest version of the Hibernate Installation file, you need to perform following two simple steps. Make sure you are setting your CLASSPATH variable properly otherwise you will face problem while compipng your apppcation.
Now, copy all the pbrary files from /pb into your CLASSPATH, and change your classpath variable to include all the JARs −
Finally, copy hibernate3.jar file into your CLASSPATH. This file pes in the root directory of the installation and is the primary JAR that Hibernate needs to do its work.
Hibernate Prerequisites
Following is the pst of the packages/pbraries required by Hibernate and you should install them before starting with Hibernate. To install these packages, you will have to copy pbrary files from /pb into your CLASSPATH, and change your CLASSPATH variable accordingly.
Sr.No. | Packages/Libraries |
---|---|
1 | dom4j XML parsing |
2 | Xalan XSLT Processor |
3 | Xerces The Xerces Java Parser |
4 | cgpb Appropriate changes to Java classes at runtime |
5 | log4j Logging Faremwork |
6 | Commons Logging, Email etc. |
7 | SLF4J Logging Facade for Java |