Using OSGi to implement auto-update

后端 未结 2 1796
忘了有多久
忘了有多久 2021-01-02 03:43

What I\'d like to do is create a \"launcher\" framework for my code that, given a URL and a predefined versioning scheme: 1) go check if an update exists 2) download the upd

相关标签:
2条回答
  • 2021-01-02 04:10

    You don't even need to download it, just check if an update is available and then call Bundle.update(InputStream) on the bundle that needs to be updated, generally followed by a call to PackageAdmin.refreshPackages() afterward.

    0 讨论(0)
  • 2021-01-02 04:19

    you can check well-known provisioning solutions that can do all your steps instead of you (check for a new version, download, install/update, restart etc.)

    1. For Equinox framework: p2 http://www.eclipse.org/equinox/p2/
    2. For any OSGi R4 framework: Apache ACE http://incubator.apache.org/ace/a-brief-introduction.html

    best regards, Dmytro

    0 讨论(0)
提交回复
热议问题