Use Java as scripting language with a shebang and syntax highlightning

Recently I have been playing with Java as a scripting language and I must say, this could become a very nice way of scripting for me. Of course, there are always soreheads that will point out Java is too slow for this and that language X or Y is so much better suited for this task, but as I am writing Java on a daily basis, I am much quicker in writing a Java script (not a javascript!!!) than e.g. a bash script. And if you do not know Java, please keep your mouth, because you have no idea how powerful it actually is. As for startup speed of the jvm, this will become less an argument because of modularity and Graal.

Using the shebang in a Java file however will rob you of all the nice features an IDE is providing you as it has no way of knowing what the file actually represents. I therefore propose (and that is what I practice from now on) to use the file extension .jv. You can than tell your IDE that a jv file should be treated as a Java file.

shebangandcodecompletion
A .jv file treated as a java file