Chapter 11. Hibernate and Eclipse: Really Using the Hibernate Tools

Installing the Hibernate Tools in Eclipse

If you’re working with Eclipse as your Java development environment (as so many of us are these days), you can take far deeper advantage of the Hibernate Tools than we have been in the rest of the book (where we just used them to add Hibernate-related capabilities to our Ant builds).

How do I do that?

Before diving in, make sure you’re running a recent enough version of Eclipse. The current release of the Hibernate Tools requires at least Eclipse 3.3 and WTP 2.0. So here’s an excuse to upgrade if you’ve been putting it off.

The easiest way to install the Hibernate Tools into Eclipse is through Eclipse’s normal update site mechanism. Start by telling Eclipse where to find Hibernate Tools, by choosing the Find and Install option in the Software Update menu, as shown in Figure 11-1.

Updating features in Eclipse
Figure 11-1. Updating features in Eclipse

We want to install something completely new, rather than update an existing plug-in, so choose Search for new features to install, and click Next.

Eclipse doesn’t automatically know about the Hibernate Tools update site, so we need to explain where to find it. Click on New Remote Site, as shown in Figure 11-2.

Installing from a new Update Site in Eclipse
Figure 11-2. Installing from a new Update Site in Eclipse ...

Get Harnessing Hibernate now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.