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

JMRI: Building with JBuilder

JBuilder is a viable platform for developing and debugging JMRI code. JBuilder extends the Eclipse open source framework and can be downloaded for free. However many developers would recommend using NetBeans, XCode, Eclipse, or even just bare Ant.

The Personal Edition of JBuilder is available for free download at http://www.borland.com/jbuilder/personal/.

After downloading and activating your copy of JBuilder 2008 do the following to import the JMRI code base.

Under the JBuilder "File" menu select "Import". A new window should pop up, select "CVS->Projects" from CVS, then press "Next". A new window asking for repository location information should appear. Enter the following for Host, Path and User.

Host: jmri.cvs.sourceforge.net
Path: /cvsroot/jmri
User: anonymous

Leave the password blank and then press "Next". A new window should appear, select "Use an existing module". A list of JMRI modules should appear, select "all" and press "Finish".

This should start the download of the JMRI code base. Once it completes you should be able to build a new jmri jar file using an ant build. To do this select "Run->External Tools->Open External Tools Dialog.."

Select Ant Build and use the "Browse Workspace.." button to select the java->build.xml file. Now press "Apply".

To build a jmri.jar file, select "Targets" and select only the "dist" check box, and then press "Run". After a few minutes new jmri.jar file will be created in the JBuilder->workspace folder.

If you're interested in building and running the JMRI code within the JBuilder environment you need to do the following. "Select Run->Open Run Dialog.." and then select "Java Application". Enter DecoderPro for the Name, and then press Browse and select "java" for the Project:, and then press the "Search" button and then find and select DecoderPro for the Main class.

Now under the "(x) = Arguments" tab, enter the Program arguments: %1%2%2%4%4%6%7%8%9.

And enter the following VM arguments:

-Xms10m
-Xmx200m
-noverify
-Dsun.java2d.d3d=false
-Djava.security.policy=security.policy
-Djava.library.path=.;lib
-Djava.rmi.server.codebase=file:java/classes/
-Dsun.java2d.noddraw

Now change the working directory to ${workspace_loc} by selecting the "Other" radio button and searching using the "Variables.." button. You should now be able to run DecoderPro from the JBuilder environment, but your serial port won't work if you're using Windows. To make the serial port operational, do the following:

Add the win32com.dll file to the JBuilder->workspace directory.

Add the javax.comm.properties file to the JBuilder2008->jre->jre->lib directory.

You should now be completely operational. If you want debug messages sent to your console window, installed a modified default.lcf file to the JBuilder->workspace directory. Now have some fun making changes to the JMRI code!