I am building a JavaFX application in Intellij that will be built and distributed with an .exe installer and will be ran as an exe Application. I have been trying to find a way to allow for remote updates, but I have only found resources that update a jar file by using another jar file hosted on a website. Is there a way to allow for remote updates to a exe JavaFX application? I have though about using update4J, but sadly I have no idea how to implement it, use it, or if it will even work with exe applications. I have tried to use FXLauncher, but I am not able to use JavaFX with maven as an error occurs whenever I try adding maven framework to the project.
Asked
Active
Viewed 1,713 times
4
-
Look at how Minecraft does it. They distribute a "launcher" which will replace/update the actual game periodically. – Roddy of the Frozen Peas Sep 18 '18 at 20:15
-
I understand that they do, but that doesn't tell me how they check for updates, what they actually send to the client, or anything else. I understand the "what" (update), not the how. That is why I am seeking help. – Corbin Sep 18 '18 at 20:19
-
You have some sort of server that the launcher calls home to. You say "I'm running version 1.9.8.666 on Windows" and it will say either "you're good to go" or "update available" and either push an update or let the user to elect to install the update. – Roddy of the Frozen Peas Sep 18 '18 at 21:00
-
1I think Minecraft just pushes new binaries entirely which makes sense. What reason is there *not* to just replace the exe with the current? – Roddy of the Frozen Peas Sep 18 '18 at 21:00
-
1Related: https://stackoverflow.com/questions/232347/how-should-i-implement-an-auto-updater – Slaw Sep 18 '18 at 21:04
-
1@Slaw, I would not say that that is directly related as that is a general approach to understanding the basics of implementing an auto updater, I am looking for an example or an article that states or discusses how it is done in regards to a native build, or more explicitly, a JavaFX exe app. – Corbin Sep 18 '18 at 22:46
-
@RoddyoftheFrozenPeas So do I use a checksum, or a config to show what files need to be updated, or do the whole thing. In regards to installing native JavaFX apps, it also installs the external libraries used within the work space. I get that I need to update the .exe, but is that all, or do I have to update the .dll files, lib files, and everything else? How would I go about telling the client what files to download? etc... – Corbin Sep 18 '18 at 22:49
-
also, Minecraft downloads a new Executable Jar of the version and places it into its own folder labeled by the game version within a folder labeled "versions". I do not want to use Executable Jars if necessary. Hence me requesting what to do in regards to a natively built JavaFX application. – Corbin Sep 18 '18 at 22:52
-
1It's your application. You need to design your own process. – Roddy of the Frozen Peas Sep 19 '18 at 00:16
-
Keep it simple. Do the whole thing. Anything else will be error prone, and I’m not sure a partial update to a native installation is feasible anyway, without a great deal of research and ongoing effort as OS locations and practices change. – VGR Sep 19 '18 at 14:42
1 Answers
4
I am the developer of update4j.
The framework used to be complex and hard to use, but the last release (1.2.2 at time of writing) significantly simplified things leaving only one pain point, namely, generating a configuration.
So for starters, launch the framework using it's own main method:
# on classpath
$ java -jar update4j-1.2.2.jar
# on modulepath
$ java -p update4j-1.2.2.jar -m org.update4j
And read the output.
Creating the configuration is done using a builder, I'm still documenting it but the class javadoc for Configuration
is quite complete.

Mordechai
- 15,437
- 2
- 41
- 82
-
I bet it is quite hard to get a time in your agenda, but I'm still looking forward to our collab :) you can message me on discord in order to make communication easier. Remember, I'm not only willing to pay but also I'm deeply interested in creating some tutorials guiding into the usage of update4j once I understand how the implementation works (just looking forward to scratch the surface, currently I just need to make it work in my project). Discord: update4j#4992 email: felipeaumann@gmail.com See you there :) – FARS Dec 26 '21 at 08:38
-
Oh I forgot, how about asking on GitHub Discussions? This way other people can also benefit from our conversation? – Mordechai Dec 27 '21 at 13:18
-
that's a good idea either, although, in order to make my question as simple as possible, I would like to review my code with you in the first place instead of copying/pasting every line of code from the demo program asking all of my questions – FARS Dec 27 '21 at 14:58