TNS Internal:NDR/Eclipse-JAXB

From NSDLWiki

Jump to: navigation, search

Contents

[hide]

Setting up Eclipse to compile with JAXB

This is written in general for any project that wants to include JAXB. Comments are made to indicate if a step is already addressed in the NDR project.

Ecipse Specific

None


Project Specific

For each project that uses JAXB, you need to perform the following steps.

create required directories

Create the following directory structure if needed (these should be created automatically by Ant)...

project/build
project/build/classes
project/build/src
project/build/src/java

copy jars into project

If the project does not already include the following jars, add them into the lib directory of the project. (NDR project has these committed.)

jaxb-api.jar
jaxb-impl.jar
jaxb-xjc.jar
jaxrpc.jar


add jaxb to external tools

  1. from menus, select Run -> External Tools -> External Tools Configuration
  2. in the left area, make sure that the project is selected under Ant Build
  3. select Classpath from the tabs
  4. select User Entries in the tree
  5. click Add JARs...
  6. navigate the lib directory of the project
  7. select jaxb-xjc.jar and click OK button


update build path

The next three settings all make changes to the build path. Follow these common steps for all three first.

  1. Right click project's name and select properties at the end of the right mouse button menu
  2. select Java Build Path


add jars to build path

Continuing from the common steps under update build path...

  1. select Libraries from the tabs
  2. click Add JARs... button
  3. navigate to the project's lib directory
  4. select all the jax*.jar files and add them


add classes dir to build path

Continuing from the common steps under update build path...

  1. select Libraries from the tabs
  2. click Add Class Folder... button
  3. navigate to the project/build/classes directory
  4. select project/build/classes directory and add it


add src dir to build path

Continuing from the common steps under update build path...

  1. select Source from the tabs
  2. click Add Folder... button
  3. navigate to the project/build/src/java directory
  4. select project/build/src/java directory and add it
Personal tools