Skip to content
forked from update4j/update4j

Update and launch Java 9+ applications. Built with the Java Platform Module System in mind.

License

Notifications You must be signed in to change notification settings

Ortner/update4j

 
 

Repository files navigation

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

Install using Maven:

<dependency>
    <groupId>org.update4j</groupId>
    <artifactId>update4j</artifactId>
    <version>1.2.2</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.2.2.jar -m org.update4j
$ java -p . -m org.update4j

To run it in the classpath, use either of:

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

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

Change Log

  • Upcoming Release
    • Java 11 compatibility: Removed JavaFX modules by using a multi-release module-info.class file.
    • 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.
  • 1.2.2
    • Added DefaultBootstrap with a straightforward CLI, and DefaultLauncher.
    • Added Configuration.sync() methods.
    • Additional file validation on update and renaming UpdateManager.verifyingFileSignature() to validatingFile() to include all of them.
    • To avoid version inconsistencies, all downloads are now atomic; if one download fails all previous are rolled back. Updated UpdateHandler.doneDownloadFile() to add awareness of this.
    • Fixed bug when downloading automatic module with no Automatic-Module-Name in META-INF/MANIFEST.MF.
  • 1.2.0
    • Bug fixes.
    • Major redo of Configuration builder API.
    • Reduced dependencies to zero.
    • Renamed Library to FileMetadata and <library> XML element to <file>.
    • Warnings if files were incorrectly added to the boot classpath.
    • Reject download if module name or package name conflicts with a module on the boot modulepath and additional ignoreBootConflict attribute to <file> to override it.
    • Directly pass instances of service providers instead of locating providers.
    • Removed deprecated methods.
  • 1.1.3-beta
    • Library.Reference.Builder no longer automatically sets modulepath to true.
    • Warn on Configuration::launch if there is no library that has set either classpath or modulepath to true.
  • 1.1.2-beta
    • Added LaunchContext.getClassLoader() method.
  • 1.1.0-beta
    • Added full support of loading jars into the classpath.
    • Added "add exports/opens/reads" support.
    • Renamed ImplicationType to PlaceholderMatchType.
  • 1.0.0-beta.1
    • Deprecated verification via a Certificate, use PublicKey instead. Will be removed completely once it graduates beta.
  • 1.0.0-beta
    • Initial release.

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

About

Update and launch Java 9+ applications. Built with the Java Platform Module System in mind.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%