Earlier quoted context omitted.
You can do that with Java too. The JDK has jpackage, but if you want something better than I'm willing to sell that to you (or give it for free, if you're open source): https://conveyor.hydraulic.dev/ It can be used to ship servers, we use it that way for our own servers. It sets up systemd so you don't need to use Docker. But where it shines is desktop apps. Windows users get a little 400kb EXE that installs/updates…
Java GUI is less appealing though
a little memory heavy, but no more than electron apps while being less janky