I installed ImageJ (sudo apt install imagej) on Ubuntu 16.04, but it does not work:
$ imagej
Open other images in this ImageJ panel as follows:
imagej -p 1 <image1> [<image2> ... <imageN>]
No JVM found to run ImageJ
Please apt-get install a JVM to run ImageJ or
set JAVA_HOME if it's not a JVM from a Debian Package.
However, OpenJDK 8 is installed:
$ java -version
openjdk version "1.8.0_91"
OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-3ubuntu1~16.04.1-b14)
OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)
What should I do to get ImageJ running?
/usr/bin/imagej, which seems to be the cleanest fix. Around line 32, changeJAVA_HOME=$(/usr/sbin/update-java-alternatives -l | grep openjdk | sort | tail -1 | cut -d' ' -f 3)toJAVA_HOME=$(/usr/sbin/update-java-alternatives -l | grep openjdk | sort | tail -1 | tr -s ' ' | cut -d' ' -f 3)(by insertingtr -s ' ' |). Maybe you want to add that workaround as well? – Byte Commander Sep 22 '16 at 16:04