Automatic update of java application

I am creating a Java application that will be downloaded free of charge from the Internet. I want to add an automatic update function in case of error correction or application improvement. For automatic updates, I divided my program into 3 units.

  • Base is a very small code that will check the new version of the second device (Uploader), update it and run it.
  • Uploader checks for a new project update and downloads any update and launches it
  • The main program is the main application and contains all the modules.

I did this for two reasons:

  • I do not want the client to restart the application in case of any update.
  • Since the application is still new, I do not want to have any problems when the user cannot start or update the application, so the database is very small and hardly has errors.

Is there a common Java / third-party method for automatic updates?

+6
source share
2 answers

Java Web Start (JWS) is an Oracle Corporation technology used to run rich client desktop applications (Swing, AWT, SWT) directly from a network or Internet link. It offers a one-click installation for platforms that support Java.

JWS provides many attractive features, including but not limited to pop-up screens, desktop integration, file associations, automatic updates (including lazy downloads and programmatic update control), the separation of natives and other resources, platform loading, architecture or Java version, environment configuration runtime (minimum version of J2SE, runtime parameters, RAM, etc.), simple management of shared resources using extensions.

+6
source

You can try using OSGi.

If you plan the correct modular structure of the application, there is a possibility that when updating the application modules you do not need to restart the application. You will only need to restart the modules, which will depend on the updated module. Reset dependent modules will run inside the application without restarting the application.

I prefer to work with Felix OSGI applications.

Apache felix

0
source

All Articles