Cross compile with jdk plugin

I am trying to pack simple java app into a snap and send it to my Raspberry Pi, but jdk plugin itself doesn’t support cross compile and I can’t get it to work with dump, because I don’t know how to set ENV_VARS to include java and it keeps throwing The specified command 'java' defined in the app 'hello' does not exist or is not executable.

Any ideas what to do with it?

Thanks