ObjectDB for Java/JDO Demo Instructions for Eclipse
|
|
|
The JDO Directory demo has been tested with Eclipse 2.1.0.
Eclipse can be downloaded from:
http://www.eclipse.org/downloads/.
Create the Project
From the main menu select File => New => Project....
In the New Project dialog select Java Project
and press Next:
Specify the Project Name and the demo Directory, and press Next:
Finally, select the Libraries tab and add jdo.jar and ObjectDB
jar file (odbfe.jar / odbse.jar / odbee.jar) located in the ObjectDB
lib directory using the Add External JARs... button.
Adding these JAR files is necessary for every project which uses ObjectDB and JDO:
Make sure that JRE System Library [jdk1.4] or above is specified, and then close the dialog with the Finish button.
Build & Run
You can build the demo by Project => Rebuild Project in the main menu (it might be done automatically when the project is created).
To run a step in the demo you can simply select its eMain class in the Package Explorer and then use the Run => Run As => Java Application command in the main menu.
Alternatively you can use the Run => Run... command, setting explictly a configuration for each step using the New button (set the configuration Name and Main Class and then press the Run button):
Step 1
This step creates a new ObjectDB database and stores an initial object graph
using JDO.
The expected output is:
The [ObjectDB Enhancer] message, indicating "on the fly" JDO enhancement of four
persistence capable classes, is not shown if these classes are already
enhanced.
Step 2
This step uses JDO to create, update and delete an object.
Eventualy, the database content remains the same after these operations.
The expected output is:
Step 3
This step retrieves objects from the database using JDO extents and queries,
without modifying the database.
The expected output is:
Step 4
The final step opens the visual manager window.
|