简体   繁体   中英

Which libraries are needed to use hibernate 4.2.0?

I searched on Google but each tutorial says different jar libs. Is there a full list of jar that I could have in order to use Hibernate correctly (on Eclipse)?

You can look at maven repository. You need all the jars that in the /lib/required/ directory. the others are for support for more fitchers like JPA and etc. but for basic app you can use this jars for version 3 is:

  • hibernate3.jar (main jar)
  • antlr-2.7.6.jar
  • common-collections-3.1.jar
  • dom4j-1.6.1
  • jta-1.1.jar
  • slf4j-api-1.6.1.jar
  • javassist-3.12.0.GA.jar
  • hibernate-jpa-2.0-api-1.0.0.Final.jar (for jpa)

Here is a good tutorial for hibernate: java brains

From: http://www.tutorialspoint.com/hibernate/hibernate_environment.htm

Following is the list of the packages/libraries required by Hibernate and you should install them before starting with Hibernate. To install these packages you would have to copy library files from /lib into your CLASSPATH, and change your CLASSPATH variable accordingly.

dom4j - XML parsing www.dom4j.org/

Xalan - XSLT Processor http://xml.apache.org/xalan-j/

Xerces - The Xerces Java Parser http://xml.apache.org/xerces-j/

cglib - Appropriate changes to Java classes at runtime http://cglib.sourceforge.net/

log4j - Logging Faremwork http://logging.apache.org/log4j

Commons - Logging, Email etc. http://jakarta.apache.org/commons

7SLF4J - Logging Facade for Java http://www.slf4j.org

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM