RFR: 8210275: Source Launcher should fail if --source is used without a source file

Alan Bateman Alan.Bateman at oracle.com
Fri Sep 21 11:32:10 UTC 2018


On 20/09/2018 21:56, mandy chung wrote:
> :
>
> FWIW.  It reads to me that the launcher mode should not be set to LM_CLASS
> when parsing -cp option as it does not know the mode until all options are
> parsed. Then set to LM_CLASS if mode == LM_UNKNOWN (if not set).
> But this requires closer inspection of the current implementation and it's
> something for the future.
This is somewhat fragile area of the launcher code. I don't think the 
processing of --class-path should set the mode as the class path can be 
used in conjunction with other options. The -jar and -m option will 
select the mode of course but other cases should probably leave it as 
LM_UNKNOWN until the final determination with IsSourceFile.

-Alan


More information about the core-libs-dev mailing list