Scripts can be packaged in a JAR file for easier distribution to your colleagues and via [Update Sites]. For this purpose, [https://github.com/imagej/example-script-collection example-script-collection] can be used as the template Maven project.
Inside the example-script-collection jar, the scripts are in <code>./resources/scripts.</code>
and therefore get added to the menu when the JAR is on the classpath (i.e. in <code>./plugins/</code> or <code>./jars/</code>).
ImageJ2 (and therefore Fiji) looks for scripts in subfolders of <code>./scripts/</code> as it is already described in the previous section, and for jars in <code>./jars/</code>. ImageJ1 recognizes plugins and scripts in <code>./plugins/</code>
= Running scripts in headless mode =