Java 6 required on mac install (fiji)

I downloaded fiji for mac today (default version). OS X then says that it requires java 6, although java 8 should be needed…
My solution was to download the java8 lifeline and then update it.

1 Like

Agree, same probleme here but I was unable to solve it.
Java 6 is unavailable for Mac so the Mac release is almost unusable

Salim

You are probably running into the macOS Path Randomization “feature”:
https://weblog.rogueamoeba.com/2016/06/29/sierra-and-gatekeeper-path-randomization/

Path Randomization is in effect if “ImageJ home:” starts with "/private/var/folders/“ in the “Info” window opened by typing “i” (Image>Show Info) with no images open. The work around for this problem is to move Fiji.app to another folder and (optional) to move it back.

-wayne

Dear @Wayne

When I saw the problem on my computer friend, I had moved the Fiji package in the Application folder.
Your link says that the GPR is deactivated outside the download folder, so I shouldn’t have been affected by GPR.

Also, I succed to start Fiji but I had to manually start on the start script available inside the Fiji Package (I think it was in a content folder, don’t remember exactly, it was showing in the explorer as a bash script).

So I think the default launcher has a problem and somewhere is still calling for Java 6

Best regards,

Salim

Yes, it is an issue with how the ImageJ Launcher works, together with how macOS handles attempts to link to the libjvm.dylib shared library.

I am working on an update to the macOS version of Fiji to avoid this issue. The macOS version of Fiji is now distributed with AdoptOpenJDK 1.8.0_202 with tweaks intended to prevent macOS from complaining. Unfortunately, the currently employed tweaks do not appear to solve the issue on all systems.

@Salim_Kanoun If you wish to test it, you can download the most recent Fiji for macOS and let us know here whether it works for you. On the three systems I tested thus far, it appeared to fix the issue on one of the systems, but not fix for the other two.

Note that this updated Java distribution:

  1. is a binary OpenJDK build licensed under the GPL with classpath exception, rather than a binary Oracle Java build licensed according to the non-OSS terms of Oracle JREs; and
  2. is a full JDK rather than only a JRE, meaning that the Script Editor should now work again out of the box to develop and execute Java plugins from source.

I also plan to update the Windows and Linux distributions of Fiji in a similar fashion, once the macOS-specific “legacy Java 6” issue is fully ironed out.

P.S. The GPR issue is also important to avoid. I would recommend moving the Fiji icon into /Applications after unpacking the distribution archive. Running Fiji directly out of the Downloads folder will not work completely correctly due to Path Randomization. (We used to generate .dmg archives for the macOS version of Fiji which might sidestep the GPR issue, but our macOS server that made the .dmg archives is no longer online. We are working on migrating that functionality to Travis CI so that we can offer .dmg archives again.)

3 Likes

Dear Curtis,

Thanks for these explanations.
Unfortunatly I don’t own any Apple device so I won’t be able to make testing.
I discovered the problem on a Macintosh computer of a friend during a shared screen session.

I will try to find colleagues in my institution that may have a Mac device to make testing.
Meanwhile, maybe @aseedb which originally reported the problem in this post could make some testing with the latest version?

I’m setting up a new mac (2018 mini) and I downloaded the latest build this morning (300 MB). It wants me to install the 6.0 JDK. If there is a way to avoid that, I’m all for it. I pulled the application out onto my desktop after unzipping and then dropped it into Applications. I think that should circumvent GPR, but I don’t really know how to tell.
Are there tests or things you need me to run @ctrueden while I have my system in this relatively virgin state?

Hi, same problem here (macOs Mojave). Just downloaded Fiji, unpacked it, and moved it to the application folder. Starting the app shows a pop-up requesting legacy Java SE6.

Just tried downloading and running a fresh copy of Fiji from /Applications and I get the same message. Never had this problem before on macOS Mojave 10.14.2.

1 Like

Yes, it is still a problem. The good news is that I am able to reproduce locally. The bad news is that I do not have time to pursue a fix within the next few days. I will try to return to this issue as soon as I can—I consider this a high-priority issue to fix.

4 Likes

Same problem here, running OS X 10.13.6.

Same problem on freshly downloaded FIJI (w/ or w/o JRE), running on OSX 10.13.6.
Moving out and back the app didn’t help.

Have to run directly the “ImageJ-macosx” script under the /Applications/Fiji.app/Contents/MacOS

Hi, any news on the bugfix?

Hi,

I stumbled about the same problem. Using a terminal I could manually start fiji by Using

/Applications/Fiji.app/Contents/MacOS/ImageJ-macosx

it complained about a Version 1.8 Java not being available but it started anyway.

out of curiosity I started

/Applications/Fiji.app/Contents/MacOS/ImageJ-tiger

which fired the above error message about a Java6 needing to be installed.

Looking into Info.plist I found that the first key CFBundleExecutable was set to ImageJ-tiger

    <key>CFBundleExecutable</key>
    <string>ImageJ-tiger</string>

using the good old vi, I changed ImageJ-tiger to ImageJ-macosx in Info.plist and - after moving the Fiji App once out of Applications and back in - Fiji started. This might be a workaround for Mojave…

Cheers
Stefan

1 Like

@stefanmuenkner Thank you very much for pointing out this inconsistency with Info.plist! I hadn’t noticed. It is indeed the source of the issue for new Fiji downloads. The generated fiji-macosx.zip bundle includes an Info.plist referencing ImageJ-tiger, which results in the “you need to install the legacy Java SE 6 runtime” problem—whereas a fully updated Fiji will have a better Info.plist with ImageJ-macosx as the launcher (as John Minter points out on the ImageJ mailing list). Unfortunately, for those who have downloaded Fiji for the first time, the problem prevents successfully launching the application in order to update it.

I am working on improving the Fiji bundle generation script now.

P.S. The reason that ImageJ-macosx does not suffer from this problem is that it uses a hack workaround for Apple craziness: load libjni before loading libjvm. See here for technical details.

2 Likes

I believe this issue is now resolved.

Download a new Fiji and give it a try!

2 Likes

Success, thank you @ctrueden!

1 Like

I did a clean install with the new installer (it is good to do that once in a while…) and it worked as expected. Thanks for your long-term effort in developing Fiji.

1 Like