Problem: I have a standalone Java app (henceforth known as \"the agent\") that runs as a service on internal company servers. It acts as a remote agent for
Different solution: use (and pay for) install4j. Check out the auto-update features here
It appears as though Webstart is the only built in way to do this at the moment.
If your application is OSGi based, you could let OSGi handle bundle updates for you. It is similar to the wrapper approach you suggest, in that the OSGi container itself is "the wrapper" and some of it won't be updated. Here's a discussion on this
Have a look at Java Web Start.
It is technology that's been part of Java since... 1.5? maybe 1.4? and allows deployment and install of standalone Java-based apps through a web browswer. It also enables you to always run the latest app.
http://www.oracle.com/technetwork/java/javase/overview-137531.html
http://en.wikipedia.org/wiki/JNLP#Java_Network_Launching_Protocol_.28JNLP.29
also see this question: What's the best way to add a self-update feature to a Java Swing application?
No need for wrapper (save memory) or java web start (adds more restrictions on your application), simply let a thread in you application check periodically for updates (e.g. from cloud) and download updates if available, then code these two calls in you application:
.sh
or .cmd
) to update your artifacts and launch your application after few seconds pause in the script(to avoid having two instances of your application at the same time). The script can overwrite needed artifacts and re-launch your application.
enjoy !