The idea is to check for updates while the application is running. The update consists of one main jar and a couple of third party jars. If updates are available:
Is this a good idea?
No. From the Javadoc:
Shutdown hooks should also finish their work quickly. When a program invokes exit the expectation is that the virtual machine will promptly shut down and exit. When the virtual machine is terminated due to user logoff or system shutdown the underlying operating system may only allow a fixed amount of time in which to shut down and exit. It is therefore inadvisable to attempt any user interaction or to perform a long-running computation in a shutdown hook.
Ergo you should not engage in long-running or blocking activities in a shutdown hook.