OpenLCB Proposal Java Prototypes Directory

This directory contains prototype implementation(s) in Java of the proposed OpenLCB™ specification.

These are primarily intended for testing proposed algorithms, not as a first implementation for use.

Applet demonstration of Blue/Gold configuration.

Applet demonstration of configuration tool loading from sample node XML.

Major subdirectories:

Contains OpenLCB source in the org.openlcb package, and source for OpenLCB CAN wire protocol in the org.openlcb.can package. The JavaDocs are available on the OpenLCB web.
contains test code of several types in subpackages:

For example, test/scenarios/ contains a scenario where two OpenLCB CAN segments are connected via a TCP/IP link and filtering gateways. The OpenLCB implementation is tested to make sure that P/C event reports are properly routed to nodes needing them, event reports are not routed when not needed, etc.

Building and Running

Java 1.5 and Ant are the standard way to build and run this code.

ant run

will do any needed compilations and run the complete set of tests using the JUnit GUI.

To create JavaDocs in the doc/ directory,

ant javadoc

(The JavaDocs are kept in SVN so they can be easily accessed from the web.)

To create an openlcb.jar file containing the currently compiled OpenLCB library code, and an openlcb-demo.jar file that also contains the test and demo code, do

ant jars

Creates the openlcb.jar and openlcb-demo.jar files from scratch, including doing the “clean” step.


The main OpenLCB library has no pre-requisite libraries.

The test code uses JUnit and JDOM via lib/junit.jar and lib/jdom.jar respectively.

Packaging and Versioning

For use in applications, we provide versioned Jar files containing parts of this prototype:

openlcb.jar – contains the org.openlcb service classes, does not include test or demo classes

openlcb-demo.jar – contains the demo code, including applets

Version summary information is kept in SVN and on a separate page.


All of the software in this directory and linked from this page is copyrighted by its authors. You many only use it subject to its license.