htSMLM.jar exported from eclipse couldn't be found in EMU list of uManager

Dear @jdeschamps
I encountered an issue of htSMLM code exportation.

Currently, I tried to use your htSMLM java code to exported a jar. After I put the jar into EMU fold of uManager, it couldn’t be identified in EMU list.

Because our lab want to add a new button based on your htSMLM, so that the corresponding function can be realized. It’s the first step to achieve that goal.

And here’re my screenshots for some operations.
image
open projects of htSMLM


exportation option(destination is EMU fold of uManager) then finish.
image
Now the jar is in EMU fold
image
It cannot be found in EMU list.

Version information:
Eclipse:2019.09
uManager: micromanager 2.0.0-gamma12.09
operation system: win10.

I will appreciate it if you can reply. Merry Christmas!
Yichun
Jan.4th 2021
Yiming’s Lab in Sustech, China

Hi Yichun,

My first guess is that by using Eclipse JAR export, you end up with a .jar with missing provider-configuration file or with the wrong sub-organization. EMU uses the Java ServiceLoader mechanism to load plugins, in particular it expects a specific .jar resources path. You can open the .jar with an archiving tool such as 7zip and check the internal lay-out. That way you can know if the provider-configuration is at the right place in the .jar.

I usually use maven to compile EMU plugins. If you are using Windows, you could try the htSMLM compilation script. (For unix systems you will have to change the path separator in the script).

I realize now that the tutorial with the example plugin uses the Eclipse JAR exporter. I can’t check it right now, but I will try to have a look in the next days on how to make it work with the JAR exporter rather than maven.

best,
J