How to deploy plugin that is using CLIJ2

Hi @haesleinhuepf and all,

Maybe this is naive question but I could not find solution/hints to solve it.

Simple situation - I have a plugin MosaicSuite and I would like to use some (super cool and fast) functions from CLIJ2. If I enable in “manage update sites” both - MosaicSuite and CLIJ stuff - everything is fine (all needed jars are downloaded/installed in Fiji).
However if somebody install fresh Fiji and enable only MosaicSuite in ‘update sites’ then CLIJ jars are missing.

Now questions:

  1. Is there any mechanism that by enabling one update site will automatically enable other update sites? (like choosing MosaicSuite will also force Fiji to install CLIJ/CLIJ2 stuff).
  2. If (1.) is not possible what exactly should I do to have MosaicSuite working properly when someone enable it (and only) in update sites?

Thanks for help!

1 Like

Hey Krzysztof @krzysg,

great questions! I’m building multiple tools on top of CLIJ as well and had similar in mind :slight_smile:

I’m not sure if it’s available already but I think I remember @frauzufall, @imagejan and @ctrueden chatting about that. Maybe they can tell us if it’s possible via code to activate an update site.

In Fijis Trainable Weka Segmentaiton, I found a piece of code that checks the availability of class A. This class A has an import towards another class B that comes via the ImageScience update site. Thus, if you try to call a static method in class A, this will fail in case the update site is not activated because class B cannot be loaded by the class loader. You can catch that exception and give a hint to the user:

Maybe, you can adapt this one to check if the CLIJ2 class is there.

Let us know if this helps!


1 Like

Thanks for help Robert!
Method you suggested works like a charm.

1 Like