Man! I really didn't expect this answer! On Tue, Nov 12, 2019 at 3:27 PM Mark Thomas <ma...@apache.org> wrote:
> On 12/11/2019 14:13, Nedim Kulovac wrote: > > Hi there. I had an issue with starting a modular Java 11 app. Basically, > I > > was wondering why my module-info. java does not require to use 'open' > > directive when using Spring Framework. I posted the question here > > > https://stackoverflow.com/questions/58737469/do-i-have-to-add-open-statement-in-module-info-java-to-open-module-for-reflectio?noredirect=1#comment103882923_58737469 > > and > > user Holger came with diagnosing that Tomcat loading my code as well as > > Spring through a custom class loader and that is why my modules and > Spring > > jars are not listed when I use --show-module-resolution, neither they > > appear in the classpath. To inspect is custom class loading done modular > or > > old style, he recommended putting > > System.out.println(SomeClass.class.getModule()); somewhere in code in the > > module. I did it and as a result, I got printed out 'unnamed module > > @595b34e5'. So the big question is: why is this happening and how can I > > resolve this? I want Tomcat to put my modules to module path normally, > not > > as an unnamed module. > > You can't. > > The Servlet API (nor any part of Java EE / Jakarta EE) does not make use > of the module system. > > Mark > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > -- *Nedim Kulovac*