Null Pointer Exception running TransformJ in Headless Mode

Hello,

I am trying to run TransformJ in headless mode, but I am getting a null pointer exception. The macro works perfectly fine when running in the GUI but not in headless mode. Any help would be greatly appreciated

Here is my macro…

run(“TransformJ Affine”, “matrix=”+shearFilePath+" interpolation=Linear background=0.0 adjust");

Here is the error…

java.lang.NullPointerException
at transformj.TJ_Affine.run(TJ_Affine.java:52)
at ij.IJ.runUserPlugIn(IJ.java:235)
at ij.IJ.runPlugIn(IJ.java:198)
at ij.Executer.runCommand(Executer.java:150)
at ij.Executer.run(Executer.java:68)
at ij.IJ.run(IJ.java:317)
at ij.IJ.run(IJ.java:328)
at ij.macro.Functions.doRun(Functions.java:686)
at ij.macro.Functions.doFunction(Functions.java:98)
at ij.macro.Interpreter.doStatement(Interpreter.java:278)
at ij.macro.Interpreter.doStatements(Interpreter.java:264)
at ij.macro.Interpreter.run(Interpreter.java:160)
at ij.macro.Interpreter.run(Interpreter.java:93)
at ij.macro.Interpreter.run(Interpreter.java:104)
at ij.plugin.Macro_Runner.runMacro(Macro_Runner.java:161)
at ij.plugin.Macro_Runner.runMacroFile(Macro_Runner.java:145)
at ij.IJ.runMacroFile(IJ.java:165)
at net.imagej.legacy.IJ1Helper$4.call(IJ1Helper.java:1165)
at net.imagej.legacy.IJ1Helper$4.call(IJ1Helper.java:1161)
at net.imagej.legacy.IJ1Helper.runMacroFriendly(IJ1Helper.java:1095)
at net.imagej.legacy.IJ1Helper.runMacroFile(IJ1Helper.java:1161)
at net.imagej.legacy.LegacyCommandline$Macro.handle(LegacyCommandline.java:185)
at org.scijava.console.DefaultConsoleService.processArgs(DefaultConsoleService.java:99)
at org.scijava.AbstractGateway.launch(AbstractGateway.java:103)
at net.imagej.Main.main(Main.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at net.imagej.launcher.ClassLauncher.launch(ClassLauncher.java:291)
at net.imagej.launcher.ClassLauncher.run(ClassLauncher.java:198)
at net.imagej.launcher.ClassLauncher.main(ClassLauncher.java:89)

Thanks,
Corey Elowsky