Select your project and right click on the it

Creat file in JPA Project

Select your project and right click on the it

Creating files in JPA project

     

After creating "JPACRUDApplication" project, you need to follow the following steps:

  1. Select "JPACRUDApplication" project and right click on it. Select New => Package

  2. The following dialog box is appear on the screen. Give the package name "roseindia" and click on "Finish" button:



    Now you get "roseindia" package is created under the "JPACRUDApplication" project. 

  3. Right click on project and select New => Folder:

  4. New Folder dialog box is appear on the screen. Give the folder name "META-INF" in Folder name text box and click on "Finish" button.


    Now you get the "META-INF" folder is created under the "src" directory of "JPACRUDApplicataion" project. 
  5. Right click on "META-INF" folder and select New => File:

  6. New File dialog box is appear on the screen. Give a file name "persistence.xml" in File name text box and click on "Finish" button:

  7. Put the database connection and provider "org.hibernate.ejb.HibernatePersistence" in "persistence.xml" file with persistence unit name.

  8. Select "roseindia" package and right click on it. Select New => Class:


  9. New Java Class dialog box is appear on the screen. Give the class name "Student" and click on "Finish" button.

  10. Right click on the project and go New => Folder

  11. New Folder dialog box is appear on the screen. Give the folder name "lib" in Folder name text box:

  12. Select all lib files which is required, copyt and paste in "lib" folder:

  13. Right click on "JPACRUDApplication" project and choose: Build Path => Configure Build Path...

  14. "Java Build Path" dialog box is appear on the screen. Click on "Add Jars..." button:

  15. Open "JAR Selection" dialog box is appear on the screen. Click on project and go lib then all jars file is open and select all jars and click on "Ok" button.

  16. Again, click on "Ok" button

Now you get project development environment has been set. Go to the next section and create the crud files with running application.