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.
Downloads 4 files then launches hello-world.jar
. You can see that subsequent runs won't download again.
Downloads 4 files then launches hello-world.jar
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.
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.
- 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
andFileMapper
lists are nowfinal
, to prevent accidentalNPE
.FileMetadata::streamDirectory
now automatically presetspath
attribute to actual filename relative to the streaming directory, instead of absolute source path.
- Java 11 compatibility: Removed JavaFX modules by using a multi-release
- 1.2.2
- Added
DefaultBootstrap
with a straightforward CLI, andDefaultLauncher
. - Added
Configuration.sync()
methods. - Additional file validation on update and renaming
UpdateManager.verifyingFileSignature()
tovalidatingFile()
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
inMETA-INF/MANIFEST.MF
.
- Added
- 1.2.0
- Bug fixes.
- Major redo of Configuration builder API.
- Reduced dependencies to zero.
- Renamed
Library
toFileMetadata
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 setsmodulepath
to true.- Warn on
Configuration::launch
if there is no library that has set eitherclasspath
ormodulepath
to true.
- 1.1.2-beta
- Added
LaunchContext.getClassLoader()
method.
- Added
- 1.1.0-beta
- Added full support of loading jars into the classpath.
- Added "add exports/opens/reads" support.
- Renamed
ImplicationType
toPlaceholderMatchType
.
- 1.0.0-beta.1
- Deprecated verification via a
Certificate
, usePublicKey
instead. Will be removed completely once it graduates beta.
- Deprecated verification via a
- 1.0.0-beta
- Initial release.
This project was highly influenced by edvin/fxlauncher. Thanks for the insights that made this possible.
This project is licensed under the Apache Software License 2.0