Creating a New Project |
This quick start shows how to create a new Java Persistence Entity project. Before creating the project, you should open the new Persistence perspective.
Switch to the new Persistence Perspective to begin working with Java persistence entities. Select Window > Open Perspective > Other. The Select Perspective Dialog appears.
On the Select Perspective dialog, select Persistence and click OK. The workbench adds the Persistence Outline and Persistence Properties views.
Now, we will create a new Java project.
Select File > New > Project. The New Project dialog appears.
On the New Project dialog, select Java Project and click OK. The Create a Java Project dialog appears.
On the Create a Java Project dialog, enter a Project name and click Next. The Java Settings dialog appears.
On the Java Settings dialog click Finish. Eclipse adds the project to the workbench and opens the Java perspective.
Finally, we will "add persistence" to the project.
Right-click the Java project in the Explorer and select Persistence > Add Persistence. The Add Persistence Dialog appears.
On the Add Persistence Dialog select a database connection (or create a new connection, using the WTP RDB) and click Finish.
Note: You must be connected to the database before adding persistence to the project. You will also need to create a table named ADDRESS (you will add its columns later). |
You can now work in the Persistence Perspective.
Now that you have created a project with persistence, you can continue with Creating a Java Persistent Entity.