Review request: JDK-8159596 Add java --dry-run
Mandy Chung
mandy.chung at oracle.com
Sat Jul 2 16:02:08 UTC 2016
> On Jul 2, 2016, at 1:01 AM, David Holmes <david.holmes at oracle.com> wrote:
>
> On 2/07/2016 1:17 AM, Mandy Chung wrote:
>>
>>> On Jul 1, 2016, at 12:48 AM, David Holmes <david.holmes at oracle.com> wrote:
>>>
>>> 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?
>>>
>>
>> Are you suggesting for java —-dry-run to run <clinit> or not to load main class? Are you thinking that if the main class can’t be found or no main entry point, launching it will fail anyway and why bother?
>
> The difference between -version and --dry-run is only the locating of the main class, which will be an obvious failure without --dry-run. It just doesn't seem to carry its weight as a new command-line arg. I had assumed the loading and/or initialization was needed to ensure the module system was all configured correctly, but based on what you have said that seems not to be the case.
Correct.
A new —-dry-run option makes it clear what it does and it can be used to test the command-line to launch an application simply by adding “—-dry-run” in the command-line.
-version is to show java runtime. Its typical usage is “java -version” and also any option following -version is ignored.
Mandy
More information about the jigsaw-dev
mailing list