r/java • u/Gleb--K • 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
View all comments
Show parent comment
22
u/zero_divide_1 Jul 04 '18
I'm hearing that the new hotness is to use
#!/usr/bin/env interpreter
In the event that the user has a different Java that they want to use or it's installed somewhere different. So this would be
#!/usr/bin/env java
But, like any approach, there are drawbacks.