Draft JEP: Launch Single-File Source-Code Programs

David Lloyd david.lloyd at redhat.com
Mon Feb 12 19:43:37 UTC 2018

On Thu, Feb 8, 2018 at 5:18 PM, Jonathan Gibbons
<jonathan.gibbons at oracle.com> wrote:
> This draft JEP contains a proposal to enhance the java launcher to support
> running a
> program supplied as a single file of Java source code. The program will be
> compiled
> and run, without the need to explicit invoke javac, or to package up a jar
> file.
> For more details, see:
> http://openjdk.java.net/jeps/8192920

Sorry if I just missed this somehow, but how would one set the Java
source version in use?  This seems like it would be necessary in order
to ensure forwards-compatibility.

Other scripting languages that launch in this way allow for printing
(or disabling) compilation warnings, so maybe that should also be a

I assume that the annotation processing pipeline would explicitly be
excluded in this mode?

Also I'm finding it really hard to avoid saying "Java script".  /me
slaps self briskly


More information about the jdk-dev mailing list