Info on JMRI:
Development tools
Code Structure
Functional Info
Techniques and Standards
How To
Background Info

JMRI: Getting the Code

Quickstart

You can download the most recent source code via CVS using:
cvs -d:pserver:anonymous@jmri.cvs.sourceforge.net:/cvsroot/jmri login
cvs -d:pserver:anonymous@jmri.cvs.sourceforge.net:/cvsroot/jmri co all 
(If asked for a password, just hit return)

Details

Our source code is distributed using CVS. (We also keep the web site in CVS, if you'd like to work with it directly.) If you want to work with the code, a few minutes installing CVS is well worth it. We're sorry, but we just can't support other methods (sending .zip files, etc), as they're just too error prone.

Many computers come with CVS installed, including Linux and MacOS X. If you're using Windows, you will need to install a CVS "client" program like WinCVS. A recent version can be downloaded from: http://prdownloads.sourceforge.net/cvsgui/WinCvs120.zip.

To get a copy of the source for your own use, you can use "anonymous checkout". For a command line cvs client, make a new directory for the project, change to it, and tell CVS you exist with

cvs -d:pserver:anonymous@jmri.cvs.sourceforge.net:/cvsroot/jmri login
This "login" line is only needed once; after that, it is remembered on your local machine. You may be asked for a password. If so, just hit return, as the empty password will be accepted. You can then get a copy of the code with
cvs -d:pserver:anonymous@jmri.cvs.sourceforge.net:/cvsroot/jmri co all

If you're using a GUI-based client like WinCVS, pull down the "admin" menu and select "command line" to get a place to type these commands. On other computers, you can type them directly on the command line.

If you have an existing copy of the code and want to update it to the most recent contents of CVS, the second command is:

cvs -d:pserver:anonymous@jmri.cvs.sourceforge.net:/cvsroot/jmri -q update -dA

See also the CVS FAQ page.

After the checkout is complete, you'll find directories called "xml", "resources", "jython", "help", "lib", "java" and others. Change to the "java" directory. There, you will find a "src" directory that contains the source code for JMRI itself, and a "tests" directory that contains various test routines.

You can look at the code with your favorite text editor. To compile and run it, you need one of the compilation tools described on the bar at the left: Ant, JBuilder, etc. (Ant may be the easiest to install and use)

Once you're working with the code, you'll probably create some improvements you'd like to contribute back to the project. This is where CVS has tremendous advantages; with the appropriate permissions and commands, you can merge your changes back into the common source automagically. Contact us when you're ready to do that or see the info on contributing.

Windows Details

Getting and updating the code with tortoisecvs
To get a initial checkout from CVS for your own use after installing
http://www.tortoisecvs.org/. Make a new directory for the project, by
creating a folder named "JMRISourceCode". Right Click/Control Click on
that folder and select CVS CVS Checkout". 
For the CVSROOT enter < :pserver:jmri.cvs.sourceforge.net:/cvsroot/jmri>
For the Server enter < jmri.cvs.sourceforge.net>

Once you have performed the initial checkout from CVS in the folder, to
update them select all of them and then Right Click/Control Click and
select "CVS Update".