Headless mode prompts errors

Hi everyone,

I use Fiji in command line to launch, in headless mode, a script. With the 1.53e version, the command prompt send me this kind of errors (but the script is still executed):

java.lang.IllegalArgumentException: Cannot handle replace call to addCheckbox in ij.plugin.FolderOpener's boolean showDialog(ij.ImagePlus imp, java.lang.String[] list)
        at net.imagej.patcher.CodeHacker.replaceCallInMethod(CodeHacker.java:723)
        at net.imagej.patcher.LegacyExtensions.injectHooks(LegacyExtensions.java:267)
        at net.imagej.patcher.LegacyInjector.inject(LegacyInjector.java:306)
        at net.imagej.patcher.LegacyInjector.injectHooks(LegacyInjector.java:107)
        at net.imagej.patcher.LegacyEnvironment.initialize(LegacyEnvironment.java:100)
        at net.imagej.patcher.LegacyEnvironment.applyPatches(LegacyEnvironment.java:494)
        at net.imagej.patcher.LegacyInjector.preinit(LegacyInjector.java:395)
        at net.imagej.patcher.LegacyInjector.preinit(LegacyInjector.java:374)
        at net.imagej.legacy.LegacyService.<clinit>(LegacyService.java:141)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at java.lang.Class.newInstance(Class.java:442)
        at org.scijava.service.ServiceHelper.createServiceRecursively(ServiceHelper.java:300)
        at org.scijava.service.ServiceHelper.createExactService(ServiceHelper.java:267)
        at org.scijava.service.ServiceHelper.loadService(ServiceHelper.java:229)
        at org.scijava.service.ServiceHelper.loadService(ServiceHelper.java:192)
        at org.scijava.service.ServiceHelper.loadServices(ServiceHelper.java:164)
        at org.scijava.Context.<init>(Context.java:278)
        at org.scijava.Context.<init>(Context.java:234)
        at org.scijava.Context.<init>(Context.java:174)
        at org.scijava.Context.<init>(Context.java:160)
        at net.imagej.ImageJ.<init>(ImageJ.java:77)
        at net.imagej.Main.main(Main.java:54)
        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)
Caused by: java.lang.IllegalArgumentException: No such method: boolean showDialog(ij.ImagePlus imp, java.lang.String[] list)
        at net.imagej.patcher.CodeHacker.getMethod(CodeHacker.java:915)
        at net.imagej.patcher.CodeHacker.getBehavior(CodeHacker.java:894)
        at net.imagej.patcher.CodeHacker.replaceCallInMethod(CodeHacker.java:667)
        ... 31 more
Caused by: javassist.NotFoundException: showDialog(..) is not found in ij.plugin.FolderOpener
        at javassist.CtClassType.getDeclaredMethod(CtClassType.java:1363)
        at net.imagej.patcher.CodeHacker.getMethod(CodeHacker.java:912)
        ... 33 more
java.lang.IllegalArgumentException: Cannot handle replace call to getNextBoolean in ij.plugin.FolderOpener's boolean showDialog(ij.ImagePlus imp, java.lang.String[] list)
        at net.imagej.patcher.CodeHacker.replaceCallInMethod(CodeHacker.java:723)
        at net.imagej.patcher.LegacyExtensions.injectHooks(LegacyExtensions.java:271)
        at net.imagej.patcher.LegacyInjector.inject(LegacyInjector.java:306)
        at net.imagej.patcher.LegacyInjector.injectHooks(LegacyInjector.java:107)
        at net.imagej.patcher.LegacyEnvironment.initialize(LegacyEnvironment.java:100)
        at net.imagej.patcher.LegacyEnvironment.applyPatches(LegacyEnvironment.java:494)
        at net.imagej.patcher.LegacyInjector.preinit(LegacyInjector.java:395)
        at net.imagej.patcher.LegacyInjector.preinit(LegacyInjector.java:374)
        at net.imagej.legacy.LegacyService.<clinit>(LegacyService.java:141)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at java.lang.Class.newInstance(Class.java:442)
        at org.scijava.service.ServiceHelper.createServiceRecursively(ServiceHelper.java:300)
        at org.scijava.service.ServiceHelper.createExactService(ServiceHelper.java:267)
        at org.scijava.service.ServiceHelper.loadService(ServiceHelper.java:229)
        at org.scijava.service.ServiceHelper.loadService(ServiceHelper.java:192)
        at org.scijava.service.ServiceHelper.loadServices(ServiceHelper.java:164)
        at org.scijava.Context.<init>(Context.java:278)
        at org.scijava.Context.<init>(Context.java:234)
        at org.scijava.Context.<init>(Context.java:174)
        at org.scijava.Context.<init>(Context.java:160)
        at net.imagej.ImageJ.<init>(ImageJ.java:77)
        at net.imagej.Main.main(Main.java:54)
        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)
Caused by: java.lang.IllegalArgumentException: No such method: boolean showDialog(ij.ImagePlus imp, java.lang.String[] list)
        at net.imagej.patcher.CodeHacker.getMethod(CodeHacker.java:915)
        at net.imagej.patcher.CodeHacker.getBehavior(CodeHacker.java:894)
        at net.imagej.patcher.CodeHacker.replaceCallInMethod(CodeHacker.java:667)
        ... 31 more
Caused by: javassist.NotFoundException: showDialog(..) is not found in ij.plugin.FolderOpener
        at javassist.CtClassType.getDeclaredMethod(CtClassType.java:1363)
        at net.imagej.patcher.CodeHacker.getMethod(CodeHacker.java:912)
        ... 33 more
Hello

The script only contains

print("Hello");

I checked with the 1.53.c, (the last version available in archive here) and it works great.

Why i obtain these errors ?

I’m on windows 10 with the 1.8.0_261 version of java.

Thanks in advance,

Loïc