Eclipse Development Environment

Prerequisites

You will have to successfully obtain the collection of dcm4che and dcm4chee modules from our code repository:

svn co https://dcm4che.svn.sourceforge.net/svnroot/dcm4che/dcm4che14/trunk dcm4che14
svn co https://dcm4che.svn.sourceforge.net/svnroot/dcm4che/dcm4chee/dcm4chee-docstore/tags/DCM4CHEE_XDS_1_0_3 dcm4chee-docstore
svn co https://dcm4che.svn.sourceforge.net/svnroot/dcm4che/dcm4chee/dcm4chee-xds-infoset/tags/DCM4CHEE_XDS_1_0_3 dcm4chee-xds-infoset
svn co https://dcm4che.svn.sourceforge.net/svnroot/dcm4che/dcm4chee/dcm4chee-arc/trunk dcm4jboss-all

Once you have done that, you need to build the software. At this point you're ready to start setting things up Eclipse.

Importing dcm4chee projects into Eclipse

1: Prep the workspace

It is recommended that you have an Eclipse workspace dedicated to dcm4che, since dcm4che may have different JVM and code formatting settings, as well as different classpath variables than your other projects.

Assuming you are starting with a clean workspace, follow Eclipse IDE Configuration instructions.

2: Set up classpath variables

Set up the following classpath variables within Eclipse. Click on Windows, Preferences, and then navigate to the Java/Build Path/Classpath Variables section.

Variable Name

Path

JBOSS_HOME

The path to the root directory of your JBoss 4.2.3 GA installation. For example; C:/apps/jboss-4.2.3.GA

FOP_HOME

The path to the root directory of your FOP installation. For example; C:/apps/fop-0.95.

CACTUS_HOME

The path to the root directory of your Cactus (J2EE testing framework) installation. For example; C:/apps/cactus-1.8.1-bin.

3: Import the dcm4chee projects

Click on File, Import, select Existing Projects into Workspace, and then click Next. With the "Select root directory" radio button selected, click on Browse, and then navigate to your root directory with sources obtained from code repository. Select this directory and click OK. You should see the list box populated with following projects:

  • dcm4che14
  • dcm4chee-docstore
  • dcm4chee-xds-infoset
  • dcm4jboss-build
  • dcm4jboss-ejb
  • dcm4jboss-hl7
  • dcm4jboss-rid
  • dcm4jboss-sar
  • dcm4jboss-wado
  • dcm4jboss-web

Uncheck dcm4chee-docstore and dcm4chee-xds-infoset and click on the Finish button.

Click on File, Import, select Maven/Existing Maven Projects, and then click Next. With the "Select root directory" radio button selected, click on Browse, and then navigate to your root directory with sources obtained from code repository and to dcm4chee-docstore/dcm4chee-docstore-store. Select this directory and click OK. You should see the list box populated with following:

  • /pom.xml dcm4che:dcm4chee-docstore-store:1.0.3:jar

Click on the Finish button.

Click on File, Import, select Maven/Existing Maven Projects, and then click Next. With the "Select root directory" radio button selected, click on Browse, and then navigate to your root directory with sources obtained from code repository and to dcm4chee-xds-infoset/dcm4chee-xds-infoset-v30. Select this directory and click OK. You should see the list box populated with following:

  • /pom.xml dcm4che:dcm4chee-xds-infoset-v30:1.0.3:jar

Click on the Finish button.

Running dcm4chee from within Eclipse

Option 1: Launch dcm4chee from within Eclipse

The dcm4jboss-sar module comes with an Eclipse launch configuration which automatically populates an Eclipse launch configuration into your workspace. All you need to do is define a String Substitution variable called DCM4CHEE_LAUNCHPAD. See DCMEE-443 for more information.

Note that the code in your workspace should obviously be in synch with the code you're trying to debug.

Option 2: Remote debugging of a local installation

To enable remote debugging you have to edit your run.conf file an JBOSS_HOME/bin/ and uncomment/add following line:
# Sample JPDA settings for remote socket debuging
JAVA_OPTS="$JAVA_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y"

This will enable java remote debugging on port 8787. Now you have to setup a new remote debugging session in Eclipse. This can be done via: Run -> Debug: Select Remote Java Application and press the "New launch configuration" button.
Choose dcm4jboss-sar as Project, set the connection properties port to 8787 and add on the Source tab all dcm4jboss projects. After hitting the Debug button the JBoss server will startup and you can start debugging.