Adding Persistence to a Project |
Use this procedure to add persistence to an existing project:
Right-click the project in the Package Explorer and select Java Persistence > Add Java Persistence.
Complete the fields in the Add Persistence Dialog to select a database connection to use with the persistent project and click Finish.
To create a new database connection, click Database Connection use the New Connection wizard.
To add the libraries that contain the JPA (Java Persistence API), click Build Path and use the Java Build Path page of the project's properties.
You should now open the Persistence Perspective.