Using Eclipse for Ponder2 Development

Eclipse provides an excellent development environment for Ponder2. This page contains instructions for setting up Eclipse to use Sun's Java APT compiler which is necessary for compiling Ponder2 Managed Objects and generating the stub-code required for Ponder2.

Assuming that you have the latest release of Ponder2 in a directory called ponder2 it is easy to import it as a new project in Eclipse:

  1. Download either the source or binary release of Ponder2
  2. If you have the source release then build the Ponder2 system by going into the ponder2 directory and typing ant build

  3. Open Eclipse
  4. Create a new Java Project

  5. Give the project a name e.g. Ponder2
  6. Select "Create project from existing source" and select the ponder2 directory you created
  7. Expand the project
  8. Remove the ponder2aptfactory.jar file (if present) from the build path

  9. Select the project and right-click to get the preferences/properties for the project
  10. Select Java Compiler | Annotation Processing and enable project specific settings and enable annotation processing


  11. Open up the Annotation Processing triangle, select Factory Path, enable project specific settings and add the two necessary Jar files (qdparser.jar and ponder2.jar) from your lib directory as as shown. Use the Add Jars... button and locate your project and the lib directory. The project name Release will differ in your Eclipse setup

  12. Click OK to close the window
  13. Now run the Ponder2 sample object test
  14. Open the run configurations dialog
  15. Select new application

  16. Give it a name e.g. SampleObject

  17. search for a main - select SelfManagedCell from the list

  18. Select arguments and add -boot SampleObject.p2

  19. Click run
  20. You should see the following output in the console window

Shell: trying port 13570
Reading boot.p2
Reading SampleObject.p2
Adding: A line of text
Retrieved: A line of text
Shell port 13570 ready

Ponder2Eclipse (last edited 2008-09-16 18:45:38 by KevinTwidle)