Hibernate Tutorial #7 - Setup Hibernate in Eclipse

Published: 01 April 2017
on channel: luv2code
58,607
550

FULL COURSE: Spring MVC and Hibernate (200+ videos)
http://www.luv2code.com/full-spring

----

This Hibernate tutorial series will help you quickly get up to speed with Hibernate.

----

DOWNLOAD SOURCE CODE for Hibernate tutorial.

http://www.luv2code.com/hibernate-tut...

----

View more videos on the playlist, Hibernate Tutorial: https://goo.gl/UKAdaq

----

Follow luv2code for more Hibernate tutorials:

Website: http://www.luv2code.com
YouTube: http://goo.gl/EV6Kwv
Twitter: http://goo.gl/ALMzLG
Facebook: http://goo.gl/8pDRdA

---

If you liked my Hibernate tutorial, then join my mailing list: Get exclusive access to new Java tutorials.

http://www.luv2code.com/joinlist

---

Questions or problems about this Hibernate tutorial? Post them in the comments section below.

---

Want to suggest a video for my Hibernate tutorial? Leave a comment below. I'm always looking for new video ideas.

Let me know what video you'd like for me to create for this Hibernate tutorial.

---

Hibernate Tutorial Transcript

Hey, in this video I'm going to show you how to setup Hibernate in Eclipse.

I love to do lists, so the first thing we're going to do is create an Eclipse Project. Then I'll show you how to download the Hibernate Files. Next we'll download the MySQL JDBC Driver. Then we'll pull it all together by adding these JAR files to the Eclipse Project and in particular we're going to add it to the Eclipse Projects Build Path. Now it's always really important to get your projects set up properly, so I'll go through all the steps required to get this working in Eclipse. We have a lot of good stuff in store, let's go ahead and dive in.

All right, so let's go ahead and move into Eclipse. The first thing I'm going to do is actually change my perspective. Currently right now, I'm using the Java EE perspective and I want to change it. I'll simply go to Window, Perspective, Open Perspective, and choose Java. You may not have to do this but I'm always in the Java EE perspective and I like to change over to just the normal Java perspective. Then I'll close off some of these windows here on the far right.

Now the first thing I want to do here is create a new project. I go to File, New, Java Project, and the project name I'll give here, I'll call it hibernate-tutorial. Just keep it simple, short and sweet. Once you're happy with that go ahead and click the finish button.

Okay, great. Now we have a very basic project, nothings there. We need to go ahead and do some housekeeping work here. The first thing I want to do is create a new folder. I'll simply right-click on my project, I'll say New, Folder. In this folder the name I'll give is lib, L-I-B, then I'll go ahead and hit finish. This is just an empty folder right now, we're going to add our Hibernate JAR Files and also our JDBC JAR Files to this folder, but right now we just set up some stuff.

Let's go ahead and do some downloading. So let's swing over here, move over to Firefox, let's go visit Hibernate's website at hibernate.org. All right, once you're at Hibernate's website there's a section here called "Hibernate ORM", the object to relational mapping framework. Go ahead and click the more button to go to the actual ORM page. Once we're here there's a nice green button here called "Download", so we're going to download Hibernate 5 which is the latest and greatest version. All right, so I'll select the link here and then it will actually start the process of downloading so I'll hit save file and the download will start. Now this is a big JAR file, it'll take awhile depending on your internet speed so I'll go ahead and step away and I'll come back once the download is complete.

All right, so our downloads complete and we have this file here on our systems. In my downloads direct we have this hibernate-release.5.1.0_Final.zip, we can go ahead and extract this file. All right, so once it's extracted we have this folder that will have all of our information inside of it. I'll go ahead and expand this folder here for a second and there's a lib directory, this is where all the Hibernate JAR files reside, so I'll go ahead and expand this lib directory. Inside of this lib directory there's a number of folders but we'll start with the first one here called "required". These are all of the JAR files that are required as bare minimum for you to use Hibernate. I'll go ahead and select all of these files and I'll copy them, I'll select them all and do a right-click and choose copy.

[snip] For complete transcript, select More - Transcript

This is the end of the Hibernate tutorial transcript.


Watch video Hibernate Tutorial #7 - Setup Hibernate in Eclipse online without registration, duration hours minute second in high quality. This video was added by user luv2code 01 April 2017, don't forget to share it with your friends and acquaintances, it has been viewed on our site 58,607 once and liked it 550 people.