Java has its issues. Its specification stagnated for a number of years due to the sun collapse and oracle acquisition. It also does not show its strengths in command line utilities, or in GUIs(Swing enthusiasts, fight me.), or in games. It really only shines when running longer lived server side applications where the tradeoffs the language makes are stronger. When you do use it for application development it is often mired in legacy framework baggage that adds little while causing you headaches.
Once application servers are killed off for good, and the next LTS JDK releases, the future should be much more exciting.
I don't really get why you would use jbang for anything. If I am producing a runnable application I can produce an executable jar already. I just don't understand what the benefit is to it instead of using an existing build tool.
As I understand graalvm still is not compatible with everything. It also doesn't really seem popular with real world developers even though it's being pushed everywhere on reddit. Probably because none of us can use it with any of our existing applications due to said incompatibilities. For example spring is still incompatible.
if you are fine using maven/gradle and whatever keep using it - jbang can still be used to run that output without user having to install and setup java.
if you are fine with the ceremony of dealing with multiple artifacts and multi nested directories just to write a utility keep doing that - jbang lets you just have one file (like bash, python,etc.) and use that directly - no separate build/compile step.
if you love to deal with maven/gradle requirements to do a few things in a project then do that - jbang lets you just write a .java file and run it any kind of project and be used as a debuggable and portable set of utilities not tied to specific build system.
If you annotate a file with JBang specific comments is it still really a Java file? At that point it seems more like a JBang script instead.
Having to install JBang instead of a JDK isn't really a benefit because it is not actually simplifying the fact that you need to install something to run your code.
It sounds like it operates as an alternate build system focused on execution instead of packaging that annotates within existing files instead of within an external file. So it actually reduces your portability and ties you to jBang being the only way to execute your project?
54
u/deadron Apr 20 '21
Java has its issues. Its specification stagnated for a number of years due to the sun collapse and oracle acquisition. It also does not show its strengths in command line utilities, or in GUIs(Swing enthusiasts, fight me.), or in games. It really only shines when running longer lived server side applications where the tradeoffs the language makes are stronger. When you do use it for application development it is often mired in legacy framework baggage that adds little while causing you headaches.
Once application servers are killed off for good, and the next LTS JDK releases, the future should be much more exciting.