Step 1: Create a Java EE 6 Web Project
We start by creating a new Java EE dynamic web project in Eclipse:
- Open the [New Project] dialog box, e.g. by using File > New > Project...
- Select Web > Dynamic Web Project and click Next.
- Choose a Project Name (e.g. Guestbook).
- Select GlassFish Server Open Source Edition 3 (Java EE 6) as the Target runtime.
Note: You may have to add GlassFish 3 as a new server by clicking the New Runtime... button and the Download additional server adapters link. Follow the instructions and specify the path to GlassFish 3 (which has to be downloaded separately) .
- Click the Finish button to create the Java EE 6 dynamic web project.
To add ObjectDB/JPA support to the project, drag the objectdb.jar file from the file system and drop it in the WebContent/WEB-INF/lib node in the Eclipse Project Explorer:
You should now have an Eclipse Java EE 6 project with ObjectDB/JPA support.
The next step is creating a JPA Entity class.