Set Up a Project Hierarchy

Although we’re going to start small in this walkthrough, once we start designing data structures and building Java classes and database tables that represent them, along with all the configuration and control files to glue them together and make useful things happen, we’re going to end up with a lot of files. So let’s start out with a good organization from the beginning. As you’ll see in this process, between the tools you’ve downloaded and their supporting libraries, there are already a significant number of files to organize.

This is especially worth doing from the outset because if you end up building something cool by following the examples in this book and end up wanting to turn it into a real application, you’ll already be in good shape. More to the point, if you set things up the way described here, the commands and instructions given throughout the examples will make sense and actually work. Examples build on one another throughout the PDF, so it’s important to get on the right track from the beginning.

If you want to skip ahead to a later example or just avoid typing some of the longer sample code and configuration files, you can download a “finished” version of the examples from http://examples.oreilly.com/hibshortcut/.

So, to get ready to experiment with HSQLDB and Hibernate:

  1. Pick a location on your hard drive where you want to work through these examples, and create a new folder, which we’ll refer to from now on as your project directory.

  2. Move ...

Get Getting Started with Hibernate 3 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.