JAVA_HOME environment variable

Java programs like ImageJ may refuse to start because they cannot find JAVA_HOME environment variable. Be sure Java JRE is installed.

apt install default-jre

Try commands:

which default-java

suppose it’s at /usr/lib/jvm/default-java, then:

JAVA_HOME=/usr/lib/jvm/default-java imagej

where imagej is the Java program of interest. If the command now works, in ~/.profile set

export JAVA_HOME=/usr/lib/jvm/default-java