avalon
avalon

Reputation: 2291

java desktop jar app auto update mechanizm

I have a desktop JavaFX 8 application. I need to implement a function for auto-updating the application. Something like 'check for updates' and 'update' dialog in other java applications. How to implement it correctly?

Upvotes: 0

Views: 626

Answers (2)

FibreFoX
FibreFoX

Reputation: 2858

When having a selfcontaining package (https://docs.oracle.com/javase/8/docs/technotes/guides/deploy/self-contained-packaging.html) (aka native bundle) created by the javapackager provided by the JDK itself, you can create new installers with the same "identifier". At least on windows these are GUIDs which need to be the same on new versions for making the installer to detect the update.

For easy creation of that installers you don't need to use the javapackager directly, when using MAVEN you can use JavaFX-Maven-Plugin or when using GRADLE just use JavaFx-Gradle-Plugin.

Disclaimer: I'm the maintainer (maven+gradle) and the author (gradle) of that plugins.

EDIT: for checking on version, you can update some text-file on your server, which contains some path to the latest installer and the version

Upvotes: 0

Alexandre Cartapanis
Alexandre Cartapanis

Reputation: 1523

A solution is to use Java WebStart (https://java.com/en/download/faq/java_webstart.xml).

Upvotes: 2

Related Questions