I’m building a Java application that will be deployed to several channels, Snap being one of them. The application will be published as
.tar.gz files attached to a GitHub release. From then on, tools such as Homebrew and Snap will download the corresponding binary, unpack and run. I’ve got a simple snap.yaml file that’s capable of downloading and unpacking *using he
dump plugin) however the problem I’m facing is in the app’s launch script ( generated with Gradle’s application plugin), as it attempts to resolve the
java executable using
Is there a way to tell a snap to consume Java from
$JAVA_HOME? Or do I need to configure a particular JDK release (provided as a snap I suppose) as a dependency/plug on my Snap? I’d rather have the consumer define which JDK provider they’d like to use instead of choosing one for them, if possible.
I’m aware of the
maven plugins for Snap, in this case they won’t be much help as the binary distro has already been created with time/date/git metadata that should be an exact match for all consumers from all deployment channels.