Skip to content
A minimal envirement to package Jython modules with maven.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


A minimal environment to package Jython modules with maven.


With ImageJ it is possible to use self written Jython modules to extend the functionality. Packages and modules can be placed at the directory jars/Lib. ImageJ's Jython is configured to add jars/Lib to the default search path for packages and modules.

If you want to use the Updater to distribute Jython packages and modules, it can be handy pack these files as a singe Jar file. As mavens is designed to create Jar files, it can be used to automate the packaging. This repository is a template for a maven project to achieve the given goal.

How-to use it

The prerequisite for using this template is to have maven installed. Afterwards only four steps will allow you to use

  1. Clone this repository.

    git clone
  2. Create the jar file by running maven.

    cd imagej-jython-package
    mvn package
  3. Copy the jar file to jars/Lib. Lib may not exist, yet.

    mkdir -p path-to-ImageJ/jars/Lib
    cp target/imagej-jython-package-0.1.0-SNAPSHOT.jar path-to-ImageJ/jars/Lib/
  4. Start ImageJ and run the following Jython script.

    # @File(label='Choose a directory', style='directory') import_dir
    from examplePackage import batch_opener
    images = batch_opener.batch_open_images(import_dir, recursive=True)
    for image in images:
You can’t perform that action at this time.