Update and launch Java 9+ applications. Built with the Java Platform Module System in mind.
Switch branches/tags
Clone or download
Latest commit b2f7bbc Nov 16, 2018

README.md

update4j-logo

Build Status Apache License Java-9+ Maven Release Gitter

Documentation available at the wiki, or explore the JavaDoc

Auto-updater and launcher for your distributed applications. Built with Java 9's module system in mind.

Screenshots

Headless

Downloads 4 files then launches hello-world.jar. You can see that subsequent runs won't download again. headless

JavaFX

Downloads 4 files then launches hello-world.jar javafx

Overview

The update4j framework is the first auto-update and launcher framework completely compatible with Java 9. Easily host your application files anywhere in the cloud accesible via a URL (even Google Drive, Dropbox, Amazon S3, or Maven Central) and you can synchronize them with all your distributed applications.

Update4j has made security its priority. Signing your files is as easy as providing your private key to the framework on your dev machine, and it will do the job itself. On the client side, you should load the public key into the framework and it will automatically verify each and every downloaded file. It will forcefully reject any files without or with invalid signatures. This is an optional feature.

As a side feature, update4j allows you to make your application running as a single instance. Any new instance of the application would pass its command-line arguments to the existing running instance and shut down.

Installation & Usage

Download from the release page, or install using Maven:

<dependency>
    <groupId>org.update4j</groupId>
    <artifactId>update4j</artifactId>
    <version>1.3.1</version>
</dependency>

You can use it as a regular dependency, or you may run it as a runnable JAR file.

To run it in the modulepath, use either of:

$ java -p update4j-1.3.1.jar -m org.update4j
$ java -p . -m org.update4j

To run it in the classpath, use either of:

$ java -jar update4j-1.3.1.jar
$ java -cp * org.update4j.Bootstrap

For more information refer to Starting the Application in the wiki.

What's New

  • 1.3.x
    • Rewrite of DefaultBootstrap.
    • You can now sign the configuration itself to ensure integrity of non-file elements, as paths and properties.
    • FileMetadata.getSignature() now returns a String instead of byte[] to avoid modification.
    • Java 11 compatibility: Removed JavaFX modules.
    • Fixed single instance bug on Linux.
    • Connection/read timeouts at 10 seconds.
    • Safer file overriding by properly handling file locks.
    • ConfigMapper and FileMapper lists are now final, to prevent accidental NPE.
    • FileMetadata::streamDirectory now automatically presets path attribute to actual filename relative to the streaming directory, instead of absolute source path.

Attribution

This project was highly influenced by edvin/fxlauncher. Thanks for the insights that made this possible.

License

This project is licensed under the Apache Software License 2.0