Java doesn’t use $HOME, I think it might read /etc/passwd directly or something similar, but regardless, try adding this to your snap:
environment:
_JAVA_OPTIONS: -Duser.home="$SNAP_USER_DATA"
Java doesn’t use $HOME, I think it might read /etc/passwd directly or something similar, but regardless, try adding this to your snap:
environment:
_JAVA_OPTIONS: -Duser.home="$SNAP_USER_DATA"