johnny
johnny

Reputation: 19755

How do I add Hibernate to an existing Eclipse project? Is Hibernate the same as JPA?

I have searched. I can't find the exact way that matches what I have. I installed Eclipse for Java EE. I then went to help and install new software. Put in the jboss url, downloaded the Hibernate libraries. Everything went fine. I also installed the JDBC driver for MySQL. I tested it. It works. Downloaded and installed slf4j because I read someone that said to (hey, I'm learning).

I started a new Java EE project, and uh, I'm kind of stuck after that. It's a "Hello World" at the moment.

I can't find out what to do. I've seen tutorials where it says create a Hibernate project, but what if I want to add it later after I start a "normal" project? I don't want to manually look for the Hibernate.jar in the download folder. I installed it and want to know how to get to it.

I also saw lots of things that said JPA and Hibernate. Are they the same thing?

EDIT: I was able to find Hibernate by right clicking on the project, new, scroll down to hibernate. I am still interested in JPA and Hibernate.

Upvotes: 0

Views: 2148

Answers (1)

JPA stands for "Java Persistence API", and it is a specification. It basically defines the APIs and behaviors of a persistence layer, and there are different implementations of the JPA specification. Hibernate is one of these implementations. There are a few others, e.g.:

http://www.oracle.com/technetwork/middleware/toplink/overview/index.html

http://openjpa.apache.org/

The JPA specification can be found here: http://jcp.org/aboutJava/communityprocess/final/jsr317/index.html

Upvotes: 2

Related Questions