This section lists the software that must be installed on your local machine before beginning to use Hibernate. Migration notes are also listed in this section for users who will be using existing databases along with Hibernate.
The software listed in this section needs to be installed before using Hibernate, running unit tests or running the demo.
JDK 1.5
To build Java applications with Hibernate you must have JDK 1.5 version installed. While this version is compatible with Hibernate, version 1.4 is no longer supported. Once installation of JDK 1.5 version is completed, you must set the environment variables.
To test Hibernate and run the demo, you will need Apache Ant 1.7.0 and JUnit 3.8.1.
Apache Ant 1.7.0
Apache Ant can be downloaded from this link. You must set the ANT_HOME environment variable to point to the Apache Ant install location. You may refer to the manual available on their website for installing and setting up Apache Ant for use.
JUnit 3.8.1
To run JUnit tests, you may use JUnit 3.8.1 version which can be downloaded from here. After installation, copy junit.jar
to $ANT_HOME/lib
directory. Section 3, “Running JUnit Tests” provides further notes on running JUnit tests.
Extract files from the Hibernate ZIP
file to the desired location. Open the directory where you have extracted these files. To use Hibernate, you must configure
the project's classpath settings to point to these jar
files. Settings for individual IDEs differ, but normally you would add the jar
files as external library files.
To use your database with Hibernate, copy your JDBC
driver into the lib
directory. Then edit the hibernate.properties
file in the etc
directory. Additional configuration notes are available in Hibernate Reference Guide, chapter 3: Configuration. The Hibernate supported databases are: Oracle9i, Oracle10g, MS SQL 2005, PostgreSQL and MySQL.