Javac ignores module-info dependencies

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Javac ignores module-info dependencies

Mike Ershov
Hello,

I noticed that javac does not take requires part of module-info as
compile class path. Is it correct behavior?
I have sources for two modules under one source root -
m1 and m2. m2 uses class from m1 but m2's module-info has no "requires
m1" statement. I expected compile-time error, but a compilation is
successful and I see runtime error. The code is attached.

Sorry in advance if this is known issue.

Thanks,
Mike