RFR: 8201274: Launch Single-File Source-Code Programs

Jonathan Gibbons jonathan.gibbons at oracle.com
Wed May 30 18:20:18 UTC 2018


Belated reply, but yes, thanks for pointing this out.

-- Jon

On 05/12/2018 09:21 PM, Jaikiran Pai wrote:
> Just gave the patch a try by locally building it. Works great! :)
>
> A minor comment- the java usage/help text shows this:
>
> Usage: java [options] <mainclass> [args...]
>            (to execute a class)
>    or  java [options] -jar <jarfile> [args...]
>            (to execute a jar file)
>    or  java [options] -m <module>[/<mainclass>] [args...]
>        java [options] --module <module>[/<mainclass>] [args...]
>            (to execute the main class in a module)
>    or  java [options] java source-file [args]
>
> Do you think that last line could instead be:
>
>    or  java [options] <source-file> [args]
>
>         (to launch a single-file source-codeprogram)
>
> to be consistent with the rest of the usage text?
>
> -Jaikiran
>
>
> On 05/05/18 3:29 AM, Jonathan Gibbons wrote:
>> Here's an update to the previously proposed patch for JEP 330: Launch 
>> Single-File Source-Code Programs.
>> It includes all review feedback so far. The changes are mostly minor, 
>> but with the addition of more test cases.
>>
>> The webrev includes a delta-webrev for those that just want to see 
>> what has changed since last time.
>>
>> Full webrev: 
>> http://cr.openjdk.java.net/~jjg/8201274/webrev.mq/index.html
>>
>>     Original webrev: 
>> http://cr.openjdk.java.net/~jjg/8201274/webrev.mq/webrev.v1/index.html
>>     Delta webrev: 
>> http://cr.openjdk.java.net/~jjg/8201274/webrev.mq/webrev.v2/index.html
>>
>> Note that the work is temporarily blocked by JDK-8202387: javac 
>> --release 11 not supported.
>> A fix for that is underway and in review: 
>> http://mail.openjdk.java.net/pipermail/compiler-dev/2018-May/011868.html
>> This work has been tested using a workaround for this issue, and will 
>> be tested again when the real fix is in place.
>>
>> -- Jon
>>
>> On 04/12/2018 01:15 PM, Jonathan Gibbons wrote:
>>> Please review an initial implementation for the feature described in
>>> JEP 330: Launch Single-File Source-Code Programs.
>>>
>>> The work is described in the JEP and CSR, and falls into various parts:
>>>
>>>   * The part to handle the new command-line options is in the native
>>>     Java launcher code.
>>>   * The part to invoke the compiler and subsequently execute the code
>>>     found in the source file is in a new class in the jdk.compiler 
>>> module.
>>>   * There are some minor Makefile changes, to add support for a new
>>>     resource file.
>>>
>>> There are no changes to javac itself.
>>>
>>> JEP: http://openjdk.java.net/jeps/330
>>> JBS: https://bugs.openjdk.java.net/browse/JDK-8201274
>>> CSR: https://bugs.openjdk.java.net/browse/JDK-8201275
>>> Webrev: http://cr.openjdk.java.net/~jjg/8201274/webrev.00/
>>>
>>> -- Jon
>>
>



More information about the core-libs-dev mailing list