So, what’s the relationship between your launcher and this client app? Is client.jar actually an update to the code in launcher.jar? Or is this some sort of trampoline thing, where launcher.jar only exists to get client.jar running?
The installed macOS .app bundle essentially acts as a bootstrapper (or trampoline) that launches the latest available version of our Java launcher.
The .app bundle includes a bundled JVM and an initial version of launcher.jar. The installed .app bundle itself is never automatically updated. Updating the bundled JVM or original launcher requires reinstalling the application.
Instead, we support application updates by downloading newer versions of launcher.jar and client.jar from the server.
The startup process works as follows:
When the user opens the .app, the bundled JVM starts the included launcher.jar.
The bundled launcher checks whether a newer launcher.jar has previously been downloaded.
If a newer version exists, the bundled launcher immediately starts it in a separate JVM process and exits.
The active launcher provides the interface for entering server connection information.
Once connected, the launcher checks the server for updated versions of launcher.jar and client.jar, downloading them as necessary.
The launcher starts client.jar in another JVM process and then exits.
If a newer launcher.jar was downloaded, it will be used the next time the .app starts.
This means we're not actually updating the installed macOS application. We're using the installed application as an entry point to execute newer Java code downloaded from the server. The reason the server provides a client.jar and launcher.jar is because the launcher allows connecting to different versions of the server. The server is deployed with client.jars that match the server version. So the launcher could connect to a server running say version 1.0.0 and another running 1.2.0, it will just download the jar and run it when connecting and loading the client.
Hopefully that explains it a little better. The process is more complex then just lauching an app.