I installed fiji (a distribution of imagej) on my Ubuntu 16.04 machine, and double-clicking the desktop icon opened the app for a second, or rather it tried to open, and then died. I looked for an answer online, and found on this page http://imagej.1557.x6.nabble.com/Fiji-crashes-UI-on-Ubuntu-all-recent-versions-td5005603.html that one can try
./ImageJ-linux64 --dry-run
This prints out the run command used by the program. It calls the system java. So I copied out the command, and switched to use the included java (fiji and imagej come with their own java) and that fixed it. I have created a shell script with the command (referencing the included java executable), and this script works to start fiji.