This is an auto-update system for Java that hopes to be simple to integrate and use. The library is designed to be thread-safe and should even handle multiple VMs updating simultaneously. It uses threads internally to provide a more capable API, and you should watch for bad access if you use it in a GUI framework.
It is licensed under the Apache License v2.0.
Work so far was sponsored by IDOS AE GmbH. When setting out, my goal was to create an auto-updater that did not force me to depend on a major framework, or required my dependencies to be signed.
Testing the new zip support in a real-life application.
The project is in Maven Central at de.idos.updates:updates-core:1.2.0
- You need JDK 6
- Run
gradlew build
- Distribute through
gradlew uploadArchives
(Sonatype registration required)
- Instantiate a
Configurator
and use its API to create a configuration file. - Put the resulting file on the classpath or into your working directory.
- Pull the latest update and then launch the main method (e.g.
Demo.startDemo()
):
String mainClass = "de.idos.updates.Demo";
String mainMethod = "startDemo";
UpdateSystem updateSystem = new ConfiguredUpdateSystemFactory().create();
updateSystem.reportAllProgressTo(new ConsoleReport());
updateSystem.checkForUpdates().updateToLatestVersion();
File versionFolder = updateSystem.getFolderForVersionToRun();
new ApplicationLauncher(versionFolder).launch(mainClass, mainMethod);
For a more complex example that can also cope with IDEs, please refer to the demo module.
- API-CHANGE: Uses the full base-URL to discover and download updates.
- No longer expects updates to reside at "./updates".
- Java 6 required (once again)
- Unpacks zipped archives in the update fileset automatically
- Uses HEAD requests to get the file size, saving bandwidth and server load.
- Java 6 required (instead of Java 7)
- Initial Release
- Discovers new versions
- Downloads and installs updates
- Dynamic classloading
- Java 7 required