Help debugging plugin run via java server / Class not found error

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Help debugging plugin run via java server / Class not found error

Richard Myers
My high level goal is to call a Fiji plugin via JNI from a C++ program.  In particular I have tried to run the plugin "Grid/Collection stitching" and I get a return value of "[abort]."  So I tried running the same command line with a Java server from the Fiji directory with the command:

c:\Users\Richard\Documents\>java -cp ./jars/*;./plugins/*;./jars/bio-formats/*;./plugins/Analyze/*;./plugins/jars/*;./plugins/macros/*;./plugins/scripts/*;./plugins/utilities/* -jar jars\ij-1.50b.jar -run "Grid/Collection stitching"

This results in an error popup window that says:

Class not found while attempting to run "Stitching_Grid"
java.lang.NoClassDefFoundError: Stitching_Grid (wrong name: plugin/Stitching_Grid)

If instead of the command "Grid/Collection stitching" I run a different pluging (eg. "Pairwise Stitching") the plugin dialog pops up ok so I think my classpath is ok; it seems something specific to this plugin is not parsing the path correctly.

I suspect the problem could be related to the "Stitching_Grid.class" file being located in a 'plugin' sub-directory of the Stitching_-3.1.0.jar file.  I have found a discussion (here) that might be related on the mailing list that indicated the error message could be incorrect and perhaps "Stitching_Grid" is not the missing class, but some other class.

I am new to Fiji development and java, so any tips on how best to debug this would be greatly appreciated.  I have cloned the Stitching plug-in and can build it from Eclipse, but I am not familiar enough with Eclipse to know how to debug this particular situation.


  -- Richard

PS> I've attached the results from plugins > utilities > ImageJ properties and also the results from using the -verbose flag.

Please avoid top-posting, and please make sure to reply-to-all!
Mailing list web interface:

You received this message because you are subscribed to the Google Groups "Fiji-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit

Fiji_properties.txt (6K) Download Attachment
verbose.txt (201K) Download Attachment