Classloading with multiple parent layers JDK11 vs JDK14

Alex Sviridov ooo_saturn7 at mail.ru
Fri Apr 17 20:11:10 UTC 2020


Hi all,
 
I have the following layers:
 
LayerA (moduleA)                   LayerB (moduleB)
             |_____________________|
                                 |
                   LayerC(moduleC)
 
LayerC has two parent layers layerA and LayerB and moduleC requires moduleA
and moduleB. When I start my application with JDK 11/14 I get no resolving errors
and everything is ok. However, when I use JDK 11 in moduleC when I use
application I get  java.lang.NoClassDefFoundError moduleB.Foo.class,
when I run with JDK 14 I don’t get such exception. The JDK I use listed
below.
 
Could anyone say — the behavior differs because of the different JDKs,
or the problem is that when multiple layers are parent there is possibility
that class won’t be found, or the problem is in my application?
 
JDK 14:
openjdk version "14" 2020-03-17
OpenJDK Runtime Environment (build 14+36-1461)
OpenJDK 64-Bit Server VM (build 14+36-1461, mixed mode, sharing)
JDK 11:
openjdk version "11.0.2" 2019-01-15
OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)
pavel at pc1:~/WorkAndShow/Server/bin$
 
 
--
Alex Sviridov


More information about the jigsaw-dev mailing list