Just a quick note for those of you using Linux and interested in Java 9 as a possible solution: as of this writing, it does not work yet, at least on my Ubuntu 16.04 system. From a recent ImageJ mailing list thread:
Is anybody successfully using Fiji with Java9 on linux?
I gave it a shot yesterday as well, and encountered similar problems. The ImageJ Launcher passes a couple of flags to Java which are no longer supported by Java 9. It is possible to prune out those flags:
$(./ImageJ-linux64 --dry-run | sed 's/-Xincgc //' | sed 's/-XX:PermSize=128m //')
However, this is not enough: when ImageJ2 spins up, it tries to use a library called Javassist to patch/enhance the ImageJ1 code, and this process fails spectacularly (over 4000 lines of errors) under Java 9. So unfortunately, ImageJ2 is not usable with Java 9 yet.
Let’s try vanilla ImageJ1!
java -jar /path/to/Fiji.app/jars/ij-1.51f.jar
But on my system, that doesn’t work either; I get:
# A fatal error has been detected by the Java Runtime Environment:
# SIGSEGV (0xb) at pc=0x00007f020abed009, pid=3702, tid=3703
# JRE version: OpenJDK Runtime Environment (9.0) (build 9-internal+0-2016-04-14-195246.buildd.src)
# Java VM: OpenJDK 64-Bit Server VM (9-internal+0-2016-04-14-195246.buildd.src, mixed mode, tiered, compressed oops, serial gc, linux-amd64)
# Problematic frame:
# C [libjava.so+0x1d009] JNU_GetEnv+0x19
So it seems Java 9 still needs to bake for a bit longer.
Edit: Actually, I tested with a too-old version of Java 9. With a recent version, you can start ImageJ1, and it does scale on HiDPI. So this is good news! I will work on fixing ImageJ2 to work with Java 9 as time allows.