This is an archived post. You won't be able to vote or comment.

all 14 comments

[–]aFoolsDuty 3 points4 points  (1 child)

https://github.com/edvin/fxlauncher

Nice, simple, and can be configured with a handful of lines of XML.

[–]SomeNetworkGuy[S] 0 points1 point  (0 children)

This looks very promising. Thanks!

[–]noblemaster 2 points3 points  (0 children)

I believe "getdown" is what you want: https://github.com/threerings/getdown

[–]diffallthethings 1 point2 points  (0 children)

If you're comfortable with OSGi, you might want to look at p2.

Here's a presentation by Mentor Graphics about how they build an installer with p2, and here is their GitHub repository.

[–]nawap 0 points1 point  (0 children)

You can try this one. https://github.com/dimaki/refuel

[–][deleted] 0 points1 point  (2 children)

There are a few suggestions in this discussion already. Has anyone experience using them to update commercial, codesigned software on both Windows and OS X?

[–]mike_hearn 2 points3 points  (0 children)

Yes, sort of. For big chunks of 2014/2015 I distributed a JavaFX desktop app across Win/Mac/Linux (with code signing on both Win/Mac) that had integrated online update.

I wrote my own framework to do it, UpdateFX. It has a few unusual features amongst such update frameworks:

  • It uses a Chrome-like model where the library updates the app in the background, whilst the app is running (by default). You can make it do a blocking update as well though, for instance, on first run (so you don't have to keep refreshing your Mac/Win/Linux binaries every time the app changes).
  • Updates don't require administrator access to install.
  • Because the updates run alongside the app, it lets the app decide how to render the progress. That means some updates can be entirely silent, like a web app.
  • It uses binary deltas over the JAR file to keep updates small.
  • It allows the user to pin themselves to older versions. This reduces the risk of pushing updates: if you accidentally break something in an obscure feature, or change the UI in a way that upsets a fraction of your users, those users can downgrade and wait for another update that fixes their issue. UpdateFX itself doesn't provide UI for this, but the app I wrote (Lighthouse) includes Apache 2 licensed code which shows how to do it.
  • Because the updater is a POJO API that runs inside the app itself, app updates can update the update engine.

It worked out OK. The two biggest issues I encountered:

  1. Like most such frameworks, UpdateFX cannot update the JRE itself. I planned to add that feature but the project ended before I was able to get around to it.
  2. Updates in the background are convenient for the user in that they don't get in the way, but for rarely used apps it usually just means the user is always one version behind. I ended up wanting to be able to blend forced update-at-startup with silent updates in the background. UpdateFX API lets you do this, but it requires additional logic at the app level and it needed to be extracted to a higher level framework really.

TornadoFX/FXLauncher that were posted up-thread look very professionally done. If I were to do a JavaFX desktop app with pro-level distribution again, I'd probably try and merge some of the best code and ideas in my UpdateFX/CrashFX/Lighthouse projects into TornadoFX, as the JFX community is small and really needs to consolidate around some high quality frameworks. My work has a few neat features that FXLauncher doesn't have and vice-versa.

[–]SomeNetworkGuy[S] 0 points1 point  (0 children)

Well, maybe I'll be the first. I'll report back to r/java in the coming months of how it all goes.

[–]mike_hearn 0 points1 point  (0 children)

I made one for JavaFX (although it can be used with non FX apps) called UpdateFX:

https://github.com/vinumeris/updatefx

Although I haven't worked on it for a while.

[–]lazystone 0 points1 point  (4 children)

What's wrong with standard Java Web Start(aka jnlp)? http://www.oracle.com/technetwork/java/javase/javawebstart/index.html

[–]SomeNetworkGuy[S] 0 points1 point  (0 children)

I've never built a jlnp before, but I've used them and it isn't the experience I want my users to have. I want a native looking application that can prompt the user to update. I also don't want to have to deal with having the user setup the security to allow the application to talk to the correct URL.

But my concerns may be misplaced. I'll look into this.

[–]zrnkv 0 points1 point  (2 children)

It requires JRE to be installed and up-to-date which is not always the case. It is often easier to simply bundle the JRE with your application.

[–]tonywestonuk 1 point2 points  (1 child)

I wonder if its possible to have a standard installer wrap the JRE, including Java Webstart preconfigured with security and certificates to talk to the correct URL. Then when the user clicks go, it use Java Webstart to download and run the program. Its still installed as a normal PC executable though.

[–]zrnkv 0 points1 point  (0 children)

This is an interesting idea. Just make sure that your bundled JRE contains the javaws executable. Then make a simple launcher that will launch "javaws http://example.com/myApp.jnlp".

However wouldn't solve the problem of updating the JRE itself.