The javac part looks OK to me.

A nit comment, in:
launcher/, there is:
return new FilterOutputStream(new ByteArrayOutputStream()) { ...

It could I think be written as:
return new ByteArrayOutputStream() {
    public void close() throws IOException {
        byte[] bytes = toByteArray();
        map.put(className, bytes);

(I.e. without the cast to ByteArrayOutputStream.)


On 12.4.2018 22:15, 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.


-- Jon

Reply via email to