Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

The following steps describe how to create an Eclipse project for the RI OCAP stack source code that will enable debugging of the OCAP java source code

1. Create a new project

  • File->New->Java Project
  • Enter Project name, and select "Finish" to accept remaining defaults

2. Import OCAP source

  • Right click on newly created project from step 1 & select "Properties'"
  • Click "Java Build Path" in the left pane of the properties form
    • Click on the "Source" tab and then select the "Link Source..." Button
      • Navigate to and select $OCCAPROOT/ri/RI_Stack/java/src/base
      • use the default folder name
      • Select the "OK" button

... Repeat above for ds, dvr, fp, hn, msm, and svm in directories located in the $OCCAPROOT/ri/RI_Stack/java/src/

3. Configure the project to work with the OCAP code

  • Right click on newly created project from step 1 & select "Properties'"
  • Click "Java Build Path" in the left pane of the properties form then select the "Libraries" tab
    • Remove "JRE System Library" (select and hit "Remove" button)
    • In order to compile OCAP code succesfully add the following external jar files
      • Hit "Add External JARs..." button
      • browse to & select $OCAPROOT/bin/lib/ocap-stub.jar
      • browse to & select $OCAPROOT/tools/generic/cybergarage/cybergarageJanuary212009.jar
      • browse to & select $OCAPROOT/tools/generic/jakarta-log4j-me/log4jMini-1.2alpha.jar
      • browse to & select $OCAPROOT/tools/generic/NanoXML-2.2.3/lib/nanoxml.jar
  • Click "Java Compiler" in the left pane of the properties form
    • Make sure "Enable project specific settings" is checked
    • set "Compiler compliance level" to 1.4
  • Click OK button at the bottom to exit the properties form

4. Configure the RI Stack to accept remote debugging connections

  • Make sure the follow entries are un-commented in $OCAPROOT/bin/$OCAPTC/env/mpeenv.ini
    • VMOPT.19=-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y
    • VMOPT.20=-Xdebug

5. Create a remote JVM debug launcher configuration in eclipse

  • Click the down arrow next to the debug icon (small green bug icon, 4th from the left, along the top eclipse icon panel)
  • Select "Remote Java Application", and click the "new" icon (upper left hand side of the form ... piece of paper with + sign in upper right corner)
  • OK Keep all of the defaults
  • Leave this form

6. Launch and debug the code

  • cd $PLATFORMROOT; runRI.sh
  • as soon as you see "Listening for transport dt_socket at address: 8000" in the output console, hit the "Debug" button on the "Launch Debug Configurations" form