Import groovy packages

externallibrary
groovy
Tags: #<Tag:0x00007fd53e5fd000> #<Tag:0x00007fd53e5fce70>

#1

Hi,

I am trying to import the XmlSlurper that is packaged in Groovy from within Fiji

import groovy.util.XmlSlurper

However this leads to

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script9.groovy: 4: unable to resolve class groovy.util.XmlSlurper
 @ line 4, column 1.
   import groovy.util.XmlSlurper
   ^

I have Groovy installed (for a Windows machine) and the GROOVY_PATH and PATH variables contain where Groovy is installed.

Is there something I am missing to get it to work from within ImageJ?

Best

Oli


ImgLib2 Virtual Stack of multiple images
#2

Using Plugins > Utilities > Find Jar For Class with groovy.util.XmlSlurper, I get:

The class groovy.util.XmlSlurper was not found in ImageJ’s class path

Searching on maven.imagej.net, you can see that the class is in the groovy-xml artifact that you’ll have to put on your Fiji class path (i.e. copy it into ./Fiji.app/jars) in order to use it.

http://maven.imagej.net/#nexus-search;classname~groovy.util.XmlSlurper


#3

Wonderful, thank you very much for the help and explanation!