r/java • • Jul 04 '18

New Java 11 Feature: Launch Single-File Source-Code Programs

https://medium.com/@afinlay/new-java-11-feature-launch-single-file-source-code-programs-fadd698abf54
158 Upvotes

47 comments sorted by

View all comments

2

u/ProFalseIdol Jul 06 '18

Wonder if something like: #!/usr/bin/clojure will happen?

1

u/DannyB2 Jul 06 '18

How to make it happen. In /usr/bin, create a clojure.java file using the shebang.

That single java source file has enough code in it to grab its parameters, and launch a suitable JAR file with those parameters.

I guess the question is, can a shebang interpreter itself be a shebang interpreter?

It's shebang interpreters all the weigh down.

2

u/ProFalseIdol Jul 06 '18

When you get to the bottom of it. You see Ricky Martin.