imagej / imagej-launcher

The ImageJ native launcher
https://imagej.net/learn/launcher
BSD 2-Clause "Simplified" License
21 stars 23 forks source link

ImageJ 1.x's ImageJ.cfg is not fully supported #77

Closed hinerm closed 3 years ago

hinerm commented 3 years ago

Based on this report it looks like trying to set the Java executable (and potentially Java path?) via ImageJ.cfg results in a search failure and fallback to system Java.

I am not sure we actually want to guarantee behavior from ImageJ.cfg but our launcher should either:

hinerm commented 3 years ago

@ctrueden thoughts?

imagesc-bot commented 3 years ago

This issue has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/updated-imagej-launcher-java-bundles/44841/8

ctrueden commented 3 years ago

This launcher was in use by ImageJ1 as well. I'm sure Wayne hasn't updated it in a long time, but might be good to check whether it still works with plain ImageJ1, and if not, why not. Seems a shame to break that support if we don't have a good reason for it.

IIRC, the ImageJ.cfg logic was in service to the ImageJ1 support. But the fact that it always falls back to system Java now when the ImageJ.cfg path doesn't exist smells like a bug to me. Shall we change the launcher to look for Java preferentially as defined in ImageJ.cfg, but still continue looking in other locations if not found there?

hinerm commented 3 years ago

Fixed in https://github.com/imagej/imagej-launcher/commit/7748f650a190253018230d51bfd63f69680f5d7a and https://github.com/imagej/imagej-launcher/commit/268c458a4e4d409658eebd52f392f4a99070259d