Draft JEP: Launch Single-File Source-Code Programs

John Rose john.r.rose at oracle.com
Tue Feb 13 16:00:22 UTC 2018

On Feb 12, 2018, at 12:01 PM, Jonathan Gibbons <jonathan.gibbons at oracle.com> wrote:
> Thank you for your detailed analysis of the landscape of the "shebang"
> mechanism and files.

You're welcome.

> With respect to your bottom-line suggestions, it is definitely the intent
> to allow  "java --source any-path", to facilitate full-range use of shebang
> in Unix.

I now see that the JEP says this explicitly; I missed this line on first reading:

> If the file does not have the .java extension, the --source option may be used to force source-file mode. 

(I agree that we don't need a pedantic --shebang option.  That would
be what I call a "splitting" design move, but Java usually favors "lumping"
design moves.)

It looks good!

— John

More information about the jdk-dev mailing list