JEP 330

Jonathan Gibbons jonathan.gibbons at oracle.com
Thu May 31 18:54:27 UTC 2018



On 05/30/2018 10:09 PM, Cay Horstmann wrote:
> I noticed that JEP 330 is proposed for Java 11. I am all for having 
> support for "shebang" in shell scripts, but as an educator, I object 
> to the characterization that the JEP will contribute to easing the 
> Java learning curve--which is spelled out in the motivation of the 
> JEP. In its current form, it will not. And there are better ways to 
> modify javac that would be helpful.
>
> If the "single file" rule were removed, and students would never have 
> to use javac, sure. But having yet another trivia fact ("You can omit 
> javac with a single source file") is not helpful. I put some thoughts 
> into http://horstmann.com/unblog/2018-05-30/index.html
>
> Cheers,
>
> Cay

Cay,

The intent of the feature, as relates to easing the Java learning curve, 
is to assist in the first few "baby steps" that some folk might take 
when starting to learn Java.

The intent is that for folk starting out from scratch, learning to use 
one command (java) is simpler than learning to use two (java and 
javac).  Once they are familiar with using java to run simple small 
programs, then they can progress to using javac and java for programs 
using many files.  Then, the next possible step on the ladder is to 
learn the jar command to make an executable.

If you are teaching folk at a level where they are already more familiar 
with command-line tools, then yes, you may want to skip the ability to 
use the Java launcher to execute single-file source code programs.

-- Jon


More information about the compiler-dev mailing list