Draft JEP: Launch Single-File Source-Code Programs

Lennart Börjeson lennart.borjeson at cinnober.com
Fri Feb 9 11:34:43 UTC 2018


> 9 feb. 2018 kl. 12:13 skrev Robert Zenz <robert.zenz at sibvisions.com>:
> 
> I fail to see why a shebang would be required at all for this proposal, can't
> `java` figure out that it was handed a source code file (ends with .java and is
> not a class file or jar)? Or alternately provide a switch to run source files?
> 
> 

The shebang convention is extremely well established in the unix world. It is simply the mechanism linux/unix provides to select the actual processor for a shell script.

If we would like a "java shell script" to be directly executable by its processor on unix/linux, I'd say java must needs support the shebang. A unix/linux user expects it.

Best regards,

/Lennart



More information about the jdk-dev mailing list