Page 1 of 1
automatic module can read classpath?
Posted: Sun Feb 09, 2025 9:14 am
by raphaelzintec
i don't remember which questions was it in your mock exam
but it said: automatic module can read classpath, how is it possible if classpath exports nothing
Re: automatic module can read classpath?
Posted: Sun Feb 09, 2025 7:02 pm
by admin
Where did you read that classpath exports nothing? Please read the topic from a textbook carefully and completely before making assumptions.
Re: automatic module can read classpath?
Posted: Wed Aug 06, 2025 12:01 am
by lucasdowman
raphaelzintec wrote: ↑Sun Feb 09, 2025 9:14 am
i don't remember which questions was it in your mock exam
but it said: automatic module can read classpath,
Slope Game how is it possible if classpath exports nothing
An automatic module can read the classpath because the module system treats the entire classpath as a single unnamed module, which is implicitly readable by all named modules, including automatic ones. However, since the unnamed module doesn't export any packages, reflective access may still be limited unless explicitly opened.
Re: automatic module can read classpath?
Posted: Wed Aug 06, 2025 12:32 am
by admin
The unnamed module exports everything i.e. all packages. Automatic module can have reflective access to classes in the unnamed module.