On 1/07/2016 4:11 PM, Mandy Chung wrote:
On Jun 30, 2016, at 10:15 PM, David Holmes <david.hol...@oracle.com> wrote:
On 1/07/2016 3:00 PM, Mandy Chung wrote:
On Jun 30, 2016, at 9:44 PM, David Holmes <david.hol...@oracle.com> wrote:
I had assumed that initialization was desirable as part of checking that
everything was specified correctly. If not then --dry-run would seem to do very
little compared to just running -version, and so doesn't really seem to carry
its weight.
—dry-run does more than -version. It loads the VM and initializes the module
system that loads the set of modules resolved at startup. It then loads the
main class. It will report any error detected by the VM or module system
initialization.
Yes but the _only_ thing it does extra (if not initializing the main class) is
loading the main class. Does that loading trigger further module 'resolution’?
No it does not trigger any further resolution. It ensures the main class is
found; or if -m is specified, the main class is found in the main module.
Module resolution is completed when VM is created.
Okay so back to my original statement - if all this does is ensure the
main class is found does it really carry its weight as a new argument?
David
If so that is fine - that is what I thought would happen in the initialization
of the main class.
clinit triggers class resolution as it is today. If the class is not found
from the boot layer and classpath, CNFE will be found.
Mandy