JAVA_HOME setting has gone missing?

I have some puzzlement over the disappearance of my system’s JAVA_HOME environment variable.

After installing the stable updates of 2020-12-30 and rebooting, I did a minor cleanup of my system by removing some AUR packages, that appeared to need rebuilding, including Bisq, and removing orphan packages, including jre10-openjdk-headless.

Bisq depends on jre11-openjdk which remains installed (indeed I reinstalled it). However when trying to build Bisq I now get an error that did not occur in previous builds:

    ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

    Please set the JAVA_HOME variable in your environment to match the
    location of your Java installation.

    ==> ERROR: A failure occurred in build().
        Aborting...

Obviously JAVA_HOME needs to be set, but where? What removed it? Is it a system level setting, that would have been set automatically, rather than user level? How should I proceed?

I have a snapshot of /home and / from before the updates but I cannot find JAVA_HOME in any of the .* hidden files in my snapshot home directory.

I was able to build Bisq, without the error mentioned above, with the command:

export JAVA_HOME=/usr/lib/jvm/java-11-openjdk

Interestingly since rebooting the system a newer version of Bisq was released which built without requiring the above export command to set the environment variable again. As expected JAVA_HOME does not appear in the environment variables listed by printenv, so I do not know why Bisq would this time build without requiring the above export command?