Java programs like ImageJ may refuse to start because they cannot find JAVA_HOME environment variable. Fix this problem on Linux as follows:
Be sure Java JRE is installed.
apt install default-jre
Try a command like:
imagejis the Java program of interest.
if the command now works, in