I have a jpackage created application that consists of a single application jar file plus some third-party dependencies. With jpackage I create installers for Linux, macOS, and Windows. All works well.
But I don't want my users to have to reinstall the application every time my application changes, so I'm looking for a way to let the user download the application jar and have that replace the one that was included with the installer.
I think the best option would be for the application jar to be downloaded into a $HOME/application_name/ directory and set the installed application's CLASSPATH to have that directory at the beginning, so that it finds the newly updated jar before the one that came with the installation. Is this possible? If so, how? I can't find anything in the jpackage documentation to suggest that capability exists. Alternatively, is it possible to directly replace the installed application jar from within the application? If so, how?
If neither is possible, is there another way? In 2+ years-old question about the same thing, the only answer suggested use of a JWS replacement, "getdown", but I don't want to go that route, as I'd lose the other benefits of jpackage.