@edvin I’ve only created some sample Java 9 stuff. I think Java Modules will either help this or need to be integrated into this use case. The use case is to provide an alternate deployment to a single large JAR. The scenario is to download a small bootstrap JAR, say a few hundred kilobytes. That JAR (a class inside the JAR) will download a core JAR. From there, zero or more other JARs will be downloaded. This includes third-party JARs.
Everything is code signed.
The motivation for this over a single large JAR is as follows.
1. Fault tolerance and ops support. Be able to remove a JAR that isn’t performing or causes a memory leak by an operations technician (rather than pushing out new code as a Java developer)
2. Licensing and compliance. Be able to deploy with certain elements removed for commercial or regulatory purposes (without crafting other special single JARs)
3. Security. Develop independent pieces on a need-to-know basis
4. Performance. Download small amounts for small requirements (and everything for the broadest requirements); also load on demand to reduce startup