ObjectDB ObjectDB

Step 4: Run the Application

You can now run the application by right clicking the Main.java file (in the [Package Explorer] window) and selecting Run As > Java Application.

The expected output in the Eclipse [Console] window, is:

Total Points: 1000
Average X: 499.5
(0,0)
(1,1)
(2,2)
(3,3)
 :
 :
(998,998)
(999,999)

When you run the application for the first time, a new ObjectDB database file is generated in the db sub-directory under the ObjectDB installation directory. Consequent runs of the application will use the existing database file to store an additional 1000 objects.

You can view the content of the database file by opening it in the ObjectDB Explorer:

This is the end of the Eclipse JPA tutorial. Learn more about ObjectDB and JPA by reading the Manual.