javac options interspersed with sourcefiles: supported?

Anthony Vanelverdinghe anthony.vanelverdinghe at
Fri May 19 18:12:09 UTC 2017


Though the documentation [1] has a synopsis of `javac [options] 
[sourcefiles]`, javac actually allows options and sourcefiles to be 
interspersed, e.g.:
     javac -g 
--release 9 -sourcepath --release 8 -cp '*'

I find this confusing (especially with long commands like the ones Maven 
produces) & would expect it to be rejected, so I'm wondering: is this 
supported behavior? If so, I believe the documentation should be updated 
accordingly. If not, I believe javac should explicitly reject such commands.


Kind regards,

More information about the compiler-dev mailing list