Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Hibernate environment


May 17, 2021 Hibernate


Table of contents


Environment

This section will show you how to install hibernate apps and some other related packages in order to prepare the development environment you need for your Hibernate app. W e'll experiment with some examples of Hibernate applications with the MySQL database, so make sure you've installed the MySQL database. To learn more about the MySQL database, you can search our MySQL tutorial.

Download Hibernate

If you already have the latest version of Java installed on your machine, follow these easy steps to download and install Hibernate on your machine.

  • The first step is to choose between wanting to install the Hibernate app on a Windows or Unix system, and then proceed to the next step to download the .zip file for the Windows system or the .tz file for the Unix system.
  • Then go to http://www.hibernate.org/downloads url to download the latest version of the Hibernate app.
  • At the time of writing this tutorial, I downloaded the hibernate-distribution-3.6.4.Final version of the app, which displays the following directory structure when we unzim the downloaded files.

Hibernate environment

Install Hibernate

Once you've done well and unziwed the latest version of the Hibernate app's installation files, you'll need to follow these two simple steps. Be sure to make sure you set your CLASSPATH variables properly, or you may run into problems compiling your app.

  • First copy all library files copied from /lib into CLASSPATH and change your CLASSPATH variable to cover all JAR.
  • Finally copy hibernate 3.jar file into CLASSPATH. This file is located in the root of the installation file and is the primary JAR for hibernate applications.

Hibernate's premise

Here's a table of packages/libraries that a Hibernate app needs, which you need to install before you can install the Hibernate app. In order to install these packages, you must copy the library files from /lib to CLASSPATH and change the CLASSPATH variable accordingly as described below.

S.N. Packages/libraries
1 dom4j - XML parsing www.dom4j.org/
2 Xalan - XSLT processor http://xml.apache.org/xalan-j/
3 Xerces - The Xerces Java Parser http://xml.apache.org/xerces-j/
4 cglib - Java class build library http://cglib.sourceforge.net/
5 log4j - Log control http://logging.apache.org/log4j
6 Commons - Logs, messages, http://jakarta.apache.org/commons
7 SLF4J - Simple log http://www.slf4j.org