I have a Java application which is launched by a shell script.
The first part of the shell script is to resolve the Java location by looking at
The shell script is working well if launched from the terminal but it fails if launched by double-clicking the
.desktop file which contains the following
Exec=/bin/sh "/opt/HO/HO" %U
Looking at the logs it seems the error occurs because
$JAVA_HOME returns nothing when the script is launched that way.
I tried to replace
/bin/bash but it also fails.
Any idea why environment variables are not found that way? What should I do?