ImageJ-MATLAB's ImageJ issues an error when launching

The following code in MATLAB had been working until very recently, but now it often issues an error.


The error message is as follows:

Undefined variable "ImageJMATLAB" or class "ImageJMATLAB.start".
Error in ImageJ (line 42)

This error message refers to the following code snippet.

    import net.imagej.matlab.*;
    if open_imagej
        % initialize ImageJ with the headless flag

This indicates that MATLAB cannot find net.imagej.matlab.ImageJMATLAB, even though I can confirm that D:\\jars\imagej-matlab-0.7.2.jar is in dynamic Java class path by using javaclasspath.

I’m wondering why this error happens (it’s strange that import net.imagej.matlab.*; does not issue an error) and if other people are experiencing the same issue.

I’m using R2018b prerelease on Windows 10.

I have the same issue
on OSX, Matlab2018a, Fiji fully updated and Applications/ in the javaclasspath.
I cannot find any other references to this problem.

1 Like

Hi @dysthe,
I just tested Fiji Windows 64bit installation from the top of this page:
on Matlab R2019a.

  1. I started and updated Fiji
  2. In the update window I added Matlab update website:
  3. installed required libraries
    after that I was able to start Fiji from Matlab by typing ‘ImageJ’ from the Fiji/scripts directory.

I hope this may help…
Best regards,

1 Like