You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 18, 2024. It is now read-only.
Mordechai Meisels edited this page Nov 10, 2020
·
8 revisions
Migrating to the new archive-based update is easy; use the UpdateOptions::archive builder to pass all options. You should then remember to install the archive:
// Thisbooleansuccess = config.update(myKey, myInjectable);
// And thisPathtempDir = Paths.get("update");
booleansuccess = config.updateTemp(tempDir, myKey, myInjectable);
if(success)
Update.finalizeUpdate(tempDir);
// BecomePathzip = Paths.get("my-archive.zip"); // you can work with string only tooUpdateResultresult = config.update(UpdateOptions.archive(zip)
.publicKey(myKey)
.injectable(myInjectable));
if(!Files.exists(zip)) // optionally check if anything was downloaded, or nothing changedreturn;
if(result.getException() == null) // successArchive.read(zip).install();
Additionally, if you use a minified runtime image, you'll have to add the jdk.zipfs module. It is a static required module, meaning it will still run without it, but you can't use the new archive based update model without it being present.