Open ctrueden opened 9 years ago
The real question is: where does that bogus macro.class
come from.
OK, I keep running across this, once every couple of months, and then forget to write down the cause: it happens in Eclipse if the net.imagej:ij
is also open and project linked to the component being run. This can happen quite frequently with ij
specifically because its master branch is typically at a release version in the POM—usually the latest, which often matches the component under active development.
I am guessing the problem only occurs on case-insensitive file systems—in my case, HFS+ on OS X. Javassist finds Macro.class
—which can be referenced just as well as macro.class
on such file systems—and gets confused.
Anyway, since there is an easy workaround, fixing this is pretty darn low priority.
The following exception is emitted at startup of ImageJ2:
I think the offending line is here. Maybe it's a bug in Javassist; I'm not sure. Regardless, we can probably fix it by avoiding a hard reference on the
ij.macro
package in favor of using reflection or indirection (perhaps aLegacyHooks#isBatchMode()
method?).