Multiple Versions at Launch-Time
Nicolai Parlog
nipa at codefx.org
Tue Oct 20 13:30:56 UTC 2015
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Hi!
There have been a number of threads regarding loading multiple
versions of the same module. The requirements say:
"It is not necessary to support more than one version of a module
within a single configuration."[1]
The threads hence usually end like this:
"The module system isn't suggesting any solutions, it is instead
leaving this problem to the build tools and containers."[2]
I can see how we can use class loaders (and now layers) to load
multiple versions at runtime. This is essentially what containers do.
Now I wonder, is there anything a build tool (or a dedicated developer
for that matter) can do to launch the JVM with multiple versions of
the same module?
Running Example:
App requires LibA
App requires LibB version 2
LibA requires LibB version 1
One way I hoped to do this was to treat both versions as two different
modules, i.e. renaming them and update the dependencies on them.
App requires LibA
App requires LibB_v2
LibA requires LibB_v1
This does not work because both modules would export the same
packages. That's a little disappointing - I hoped it wouldn't matter
because no module is reading from both versions.
Since this failed I see no way to solve this aspect of JAR hell
without containers. Does anybody else seen one?
so long ... Nicolai
[1] http://openjdk.java.net/projects/jigsaw/spec/reqs/#multiple-versions
[2]
http://mail.openjdk.java.net/pipermail/jigsaw-dev/2015-October/004787.ht
ml
- --
PGP Key:
http://keys.gnupg.net/pks/lookup?op=vindex&search=0xCA3BAD2E9CCCD509
Web:
http://codefx.org
a blog about software development
http://do-foss.de
Free and Open Source Software for the City of Dortmund
Twitter:
https://twitter.com/nipafx
Diaspora:
nipa at pod.geraspora.de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBCAAGBQJWJkIPAAoJEMo7rS6czNUJKqcP/jCPBM5bhYbLg1iM04CshfKc
5Ers7HvrnxEvES9wVEFkM2MMCieNwZfK5FCuKUWoM3nwxjbU4rgG6tzRwxfUphky
mMIcfUaqUPzBBaA/rtdk7NVhwMv4fK45eaylL/1LpH0xgSbBgTN4FnqMRKiLuKNJ
yPZAbXHwhAGjDIEUjdxcenmS494CJHNcI2QgR1onC2kEBZe0r+rH48WQwncMq9dy
WKetJi8U5uCUpBGAs+7Qi6GbAMIY03t4Vlb5+13hgvjkvX9bY6T47Ey1wC85Lx+X
OzTrktnJxzaQQNeqsLcYfvLRW9kEWj+N178He7+IWffBVDZCwdEeErZUWrbAwHKe
2o6iFYxtDoU/NzviniL+kUPcmi4dUsO/953HhCAjIET2DJRh2Jr3DrJ+eoVvdKZD
0EkCaO1tpo4QJXiu3aM1f1qFbZj6QaYb2YQSqsUllc+9n4nzDCH2QS69Y9Q5dO3s
Gu7pfsAGBLUESyIWaVhiIQQ5jxsoTUvSbG5dn/NfGO10qeewmBdOpuvCJPptr9UP
5l/aCUz6PL6PRPN2B/iPkc6I1jkq3lAzd+FtvKZ6CI4RAfKMOKBkrQ7jiLz3SAVY
2jV6vAizHQBF8UPpA+HJOgUue9WNJrLPD7LpeOpmlamwaRSRIiE5j2goFMAp2QC5
4AybhvOsjbM65c/CmWpV
=XAwk
-----END PGP SIGNATURE-----
More information about the jigsaw-dev
mailing list