ij-plugins / ijp-color

Plugins for ImageJ - color space conversions and color calibration
GNU Lesser General Public License v2.1
23 stars 2 forks source link

Help Needed: Not able to run the plug in after installation #76

Closed coweiooi closed 1 year ago

coweiooi commented 1 year ago

Hi Jarek Sacha,

I faced an issue when trying to launch the Color Calibration Plugin. The error message return is as follow:

"Plugin or class not found: "ij_plugins.color.calibration.ColorCalibrator" (java.lang.ClassNotFoundException: ij_plugins.color.calibration.ColorCalibrator"

Here's some info on my setup

I saved the Fiji/ImageJ2 at my c: drive (C:\Fiji.app)

Here's what I have tried 1) Installed the plug in using the dropdown menu, Plugins > Install..., after installation, restart Fiji, the plugin is not shown under the Plugins...fail 2) study other plugin, found there is a plugin.config file for all plugins, so I manually created a plugin.config file, with a single line of text, "Plugins>Color, "Color Calibration...", plugins.ij_plugins.color.calibration.ColorCalibrator", saved and archived it into the same ijp-color plugins, restart Fiji....fail 3) last try, create folder "\ij_plugins" in \plugins folder (C:\Fiji.app\plugins\ij_plugins), then move the ijp-color plugin into the folder...fail

I'm not sure which area I have overlook. kindly help. Thank you so much.

jpsacha commented 1 year ago

The error possibly indicates that FIJI sees plugin declaration but cannot find that actual plugin. The plugin binaries already contain "plugin.config". Creating additional one can really confuse things.

Please follow the steps in "Option 1" described on the main page:

  1. Download the zip archive containing plugins from Release page. Look for in the asset section for an ijp-color_plugins_*_win.zip file, assuming you are using Windows, or ijp-color_plugins_*_mac*.zip for MacOS. Note version 0.12.1 did not released binaries (as there were no ends user visible changes). Look for version 0.12.0.
  2. Unzip into ImageJ's/FIJI plugins directory. It should create subdirectory ij-plugins. There should be several files with extension *.jar
  3. Restart ImageJ
coweiooi commented 1 year ago

I followed your instructions. now I encountered another problem when I started the plug-in (error message as below). The Java version in my computer is 18.0.2.1. please help. Thanks again.

image

jpsacha commented 1 year ago

The error says JavaFX binaries are of version 55, that means targeted for Java 11 and up(https://javaalmanac.io/bytecode/versions/). That should work fine with Java 18.0.2.1.

Can you double check what ImageJ thinks it is using? In ImageJ select "Help" > "About ImageJ". What version of Java is shown indicated there?

It will look something like this:

Screenshot 2023-01-19 at 6 17 32 PM
coweiooi commented 1 year ago

I found out that I launched ImageJ with ImageJ.exe, if launched with ij.jar instead. the version shows Java 18. so I continue to try out the plug in, an error message as below popped up. Thought is memory issue, so I downloaded the ImageJ.bat and launched it, but the Java version went back Java 1.8. I tried running the plug-in, and got the earlier message in my previous post.

image

jpsacha commented 1 year ago

I assume that you refer to ImageJ.bat from WIKI: https://github.com/ij-plugins/ijp-color/wiki/ImageJ-Launcher-Troubleshooting

That ImageJ.bat assumes that Java is installed in the ImageJ installation directory (jre\bin\javaw.exe). Looks that you have Java 1.8 in your ImageJ directory, and Java 18 in some other directory. You can modify the ImageJ.bat to use your Java 18.

Assume that your Java 18 is in directory C:\Apps\jdk-18. The Java executable should be typically in C:\Apps\jdk-18\bin\javaw.exe Here is an updated content of the ImageJ.bat

set MAXIMUM_MEMORY=2g
set JAVA_EXE=C:\Apps\jdk-18\bin\javaw.exe

start /b %JAVA_EXE% -Xmx%MAXIMUM_MEMORY% -cp plugins/ij-plugins/*;ij.jar ij.ImageJ

You will need to update value for JAVA_EXE with the path to your Java 18 executable (if you have space characters in the path you will need to escape them with \).

I will update WIKI instructions once its start working for you.

coweiooi commented 1 year ago

I launch ImageJ with ij.jar (Executable Java File), the java version will show Java18. The problem I encounter now is as screenshot below.

image

a more detail error message as below image

jpsacha commented 1 year ago

If you just click on ij.jar it may start ImageJ, but it will not be setup correctly. You are getting the same error as before. The solution is described in the previous post. It addresses 2 issues you had:

  1. Running out of memory: you need option -Xmx
  2. Not loading IJP-Color plugins correctly due to class path not being set, you need option -cp plugins/ij-plugins/*;ij.jar

Please try to use the "ImageJ.bat":

set MAXIMUM_MEMORY=2g
set JAVA_EXE=C:\Apps\jdk-18\bin\javaw.exe

start /b %JAVA_EXE% -Xmx%MAXIMUM_MEMORY% -cp plugins/ij-plugins/*;ij.jar ij.ImageJ

Adjust JAVA_EXE to location of your Java binary

coweiooi commented 1 year ago

Problem solved! :) Thank you so much for your guidance!

image