This page describes how to configure your MATLAB environment to be an OD Toolbox developer.
You should only have to perform this setup:
First, be sure to get a working copy of JAT and the ODTBX source code. This is described on the [RepositoryInstructions] page.
Since ODTBX depends on JAT you should also follow the instructions at [EclipseSetup] to build the JAT bytecode. You will need that paths used by the Eclipse project that you create here. (If you are using another Java IDE or compiler then you will need the path locations to the JAT Java source code and bytecode.)
If you don't already know it, find your MATLAB user path location. This user path location is defined by MATLAB and depends on your operating system. If you don't know what it is, then simply open MATLAB and run
>> userpath
This location varies depending on the MATLAB release and operating system. R2008a on Vista returns: C:\Users\<username>\Documents\MATLAB;.
If you don't like this location and want to change it read the MATLAB help topics on userpath and Startup Directory for the MATLABÂŽ Program.
Next, copy the startup.m file from the ODTBX working copy location into your user path directory.
Open your user path startup.m in your favorite editor. Read startup.m's documentation until you get to:
%
% DEVELOPER SETUP ENDS (That's it for a standard developer setup.)
%
After reading the comments you might want to uncomment this section:
clear java % Clears Java classes
restoredefaultpath % Restores the default Matlab path
javaclasspath({}) % Clears dynamic java class path (leaves static path)
if you are using MATLAB for work other than ODTBX or if you're moving between different ODTBX repo locations. If you start doing work with the incorrect paths then things might work... or they might mysteriously start failing. This was put here after some tough lessons learned by several developers. You have been warned.
You only have to change a few lines to correctly tell MATLAB where to find the ODTBX and JAT code.
1) Set the odtbxPath to the location you placed your working copy main directory. This is usually your /trunk working copy, but it could be a particular /branch/<branchname> location.
2) Set the odtbxMicePath to the location of the "mice" directory that was checked out from under vendor and the platform-specific MICE version that you need. Note, you do not have to have all MICE versions checked out at the same time (and probably shouldn't).
3) Set the jatSrcPath to the location of the JAT source (.java) files.
You don't have to do anything else if you are using Eclipse and the instructions on [EclipseSetup]. The bytecode (.class) files will reside here as well.
If you are a developer who is not using Eclipse and your bytecode files are placed in a separate directory from the source, then set jatBytecodePath accordingly so MATLAB can access those bytecode files.
Restart MATLAB and it should read your modified startup.m. Check to see that your paths have been correctly added to MATLAB by running
>> path
and
>> javaclasspath
You're free to modify your startup.m (in your user path) any way that you desire. At the end of startup.m there is a section for ODTBX end-users or developers to add whatever they want:
%
% End-User Customization Goes Here:
%
However, DO NOT CHECK IN YOUR MODIFIED startup.m!
The startup.m in the ODTBX working copy should be left untouched while your startup.m in your user path gets all the modifications. The uncommented developer section is important to the regression tests, so don't change it.
[ForDevelopers] - Go back to the main development page
WikiStart - Go back to OD Toolbox Home
Wiki: EclipseSetup
Wiki: ForDevelopers
Wiki: Home
Wiki: RepositoryInstructions