Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?


Failed to load latest commit information.
Latest commit message
Commit time


DOI Java CI with Maven GitHub GitHub pull requests GitHub issues GitHub Org's stars Twitter Follow Gitter

There are a number of repositories in active development under GitHub for handling NeuroML and LEMS with Java. To make it easier to access all of this functionality, we've created a single package, jNeuroML, which allows access to most of this functionality through a simple command line interface and requires minimal installation.

jNeuroML can:

  • Validate NeuroML v1.8.1 and v2.x files
  • Simulate most NeuroML 2 models (simulation should be specified in Simulation element in LEMS file)
  • Export NeuroML 2 and LEMS to many formats such as Neuron, Brian, Matlab, etc.
  • Import other languages into LEMS (e.g. SBML)

Binary installation

To get a precompiled binary for jNeuroML, go to, download the latest file and you have everything you need. Unzip on your local machine and go into the jNeuroMLJar directory.

You can also check out the most recent verson of the jar file using:

svn checkout svn://
cd jNeuroMLJar


The NeuroFedora community initiative provides jNeuroML for use on the Fedora Linux Distribution. Fedora users can install jNeuroML using the following commands:

sudo dnf copr enable @neurofedora/neurofedora-extra
sudo dnf install jneuroml

Please see the project documentation for more information.


Typing ./jnml (or jnml.bat on Windows) will list the options available. Some of the current options include:

./jnml -validate MyNeuroML.nml              (validate NeuroML 2 document against the current schema)
./jnml -validatev1 MyNeuroML1.xml           (validate NeuroML v1 document against the v1.8.1 schema)
./jnml MyLEMS.xml                           (parse & simulate a LEMS model using jLEMS)
./jnml MyLEMS.xml -graph                    (generate png of structure of LEMS model using GraphViz)
./jnml MyLEMS.xml -neuron                   (generate code to run on the NEURON simulator)

Export and import features for NEURON, SBML, Brian etc. are under active development (see and


Adding the environment variable JNML_HOME, pointing to the jNeuroML folder, as well as adding this path to the PATH variable will let you use the jnml utility from any folder.

Getting the source for jNeuroML

If you prefer to clone all of the individual repositories and build the jNeuroML application yourself, use the utility in the jNeuroML repo:

git clone git:// neuroml_dev/jNeuroML
cd neuroml_dev/jNeuroML

This will clone ~11 repos for NML2 & LEMS (including Python based libraries) into neuroml_dev/ and compile the Java based ones using Maven (download here or use package managers for Linux (e.g. apt-get install maven) or Mac (brew install maven)). The full process may take 5-10 mins on first installation, but subsequently running:

git pull

in the jNeuroML folder will get the stable version of each repo & compile using Maven if necessary.

To access the very latest version (the development branches of the GitHub repos) use:

python clean
python development

Use of Maven is a great way to manage versions of applications being developed in distributed repositories, and will make it easy to use selected parts of this for different Java applications. For example, these packages will be used in various ways to provide NeuroML/LEMS support in neuroConstruct and for handling NeuroML on the Open Source Brain website.

Prefer Python?

If you prefer using/installing/coding in Python, try out pyNeuroML. Much of the functionality of jNeuroML is bundled inside pyNeuroML and can be accessed with a command line utility (pynml) with similar usage as jnml.

This code is distributed under the terms of the GNU Lesser General Public License.