Given that Java 9 is upon us and we can finally have a java REPL with jshell I was hoping there was a way to add a shebang to a script and have jshell
jshell
Inspired by steiny answer, I came up with a more generic solution
https://gist.github.com/ffissore/012d7e32a096fde5266f49038c93dcaf
In essence: jshell-wrapper will strip the first line of the script (which is supposed to be the shebang) and will add a /exit at the end of the script
jshell-wrapper
/exit