automatic module can read classpath?

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
raphaelzintec
Posts: 167
Joined: Sun Apr 21, 2024 10:43 am
Contact:

automatic module can read classpath?

Post 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

admin
Site Admin
Posts: 10403
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: automatic module can read classpath?

Post by admin »

Where did you read that classpath exports nothing? Please read the topic from a textbook carefully and completely before making assumptions.

lucasdowman
Posts: 1
Joined: Tue Aug 05, 2025 11:53 pm
Contact:

Re: automatic module can read classpath?

Post 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.

admin
Site Admin
Posts: 10403
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: automatic module can read classpath?

Post by admin »

The unnamed module exports everything i.e. all packages. Automatic module can have reflective access to classes in the unnamed module.

Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests