TNS Internal:NDR/Eclipse-JAXB
From NSDLWiki
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
- from menus, select Run -> External Tools -> External Tools Configuration
- in the left area, make sure that the project is selected under Ant Build
- select Classpath from the tabs
- select User Entries in the tree
- click Add JARs...
- navigate the lib directory of the project
- 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.
- Right click project's name and select properties at the end of the right mouse button menu
- select Java Build Path
add jars to build path
Continuing from the common steps under update build path...
- select Libraries from the tabs
- click Add JARs... button
- navigate to the project's lib directory
- select all the jax*.jar files and add them
add classes dir to build path
Continuing from the common steps under update build path...
- select Libraries from the tabs
- click Add Class Folder... button
- navigate to the project/build/classes directory
- select project/build/classes directory and add it
add src dir to build path
Continuing from the common steps under update build path...
- select Source from the tabs
- click Add Folder... button
- navigate to the project/build/src/java directory
- select project/build/src/java directory and add it