This page has instructions on how to create a single JAT project in Eclipse for use with OD Toolbox development. Multiple JAT projects in Eclipse can be created from multiple JAT working copies by repeating these instructions.
These instructions are based upon the ability to share Eclipse project-specific settings amongst team members using source control. This makes project setup simpler and also standardizes JAT build settings on the team. A recent version of Eclipse (e.g. v4.2+, found here) should be used.
References to the JAT external jars location in the working path is handled using an Eclipse classpath variable that each developer will set for their working copy layout. This classpath variable is stored in the developers Eclipse workspace settings and is not checked into source control.
(As of Sep 2012, Eclipse v4.2 was used to create the .project, .classpath, and .settings directory for the JAT /branches/ODTBX repository location. These will need to be updated as Eclipse changes.)
Before we begin, check out the JAT codebase for use with OD Toolbox and its supporting external jars. These locations are found on the [RepositoryInstructions] page.
1) Start Eclipse. (If unsure of the workspace selection just use the default.)
2) Import a Project...
3) Tell Eclipse that this will be an existing project
4) Find the project
At this point you should have a JAT project appear in your Project Explorer. The project name may vary. For example, the JAT Subversion repository location at /branches/ODTBX/ has its /branches/ODTBX/.project named Jat_ODTBX_branch.
5) Tell Eclipse where to find the external jars:
At this point, Eclipse should have built the JAT project. If not, select Project->Build All. Go to the Problems View in Eclipse to see if there were any build errors. (The Problems View is under the Window menu -> Show View -> Problems)
Most likely any build errors are a result of not setting the JAT_TOP variable correctly. Remember, JAT_TOP is not the external_jar directory itself. Make sure that all of the classpath variable entries are correct in the Project's properties: Java Build Path -> Libraries tab. However, occasionally Eclipse doesn't always resolve all of the classpath references with new workspace variables. Close the Eclipse Project, Jat_ODTBX_branch, and then re-open it. If the JAT_TOP location is set correctly the references should be resolved.
Note that although there are many Java compiler warnings for JAT there should be no build errors.
The .project file only specifies the project name.
The .classpath file specifies the existence of JAT_TOP and the relative location of all required jars under it. It does not define JAT_TOP.
The .setting directory contains project customizations. Currently, this sets the Java Compiler compliance level to 1.5 for consistency across platforms and the project encoding to UTF-8.
If a developer is going to have multiple JAT working copies then multiple projects can be easily created. Each project (.project file) will have to have a different name before importing into Eclipse. If there are differences in the external jars that JAT depends upon then a different classpath variable than JAT_TOP will have to be modified in the other project(s). This is because JAT_TOP is a workspace variable and applies to all projects.
Simply changing JAT_TOP in the .classpath file and checking it in surprises the other developers and is bad form.
[ForDevelopers] - Go back to the main development page
WikiStart - Go back to OD Toolbox Home
Wiki: ForDevelopers
Wiki: Home
Wiki: MatlabEnvSetup
Wiki: OdtbxReleaseProcess
Wiki: RepositoryInstructions