This week Jonathan Bennett and Jeff Massie chat with Max Rydahl Andersen about JBang, the cross-platform tool to run Java as a system scripting language. That’s a bit harder than it sounds, particularly to take advantage of Java’s rich debugging capabilities and the ecosystem of libraries that are available. Tune in to get the details, as well as how polyglot files are instrumental to making JBang work!
- https://www.jbang.dev/
- https://maxandersen.github.io/getting-started-with-java-the-jbang-way/
- https://xam.dk
Did you know you can watch the live recording of the show Right on our YouTube Channel? Have someone you’d like us to interview? Let us know, or contact the guest and have them contact us! Take a look at the schedule here.
Direct Download in DRM-free MP3.
If you’d rather read along, here’s the transcript for this week’s episode.
Sounds like a great way to get sued by Oracle. And I say that as a ZFS user.
There is nothing here that should make you target for a lawsuit.
JBang just like Maven, Gradle or similar tools uses javac and java which are all opensource tools and available under FLOSS licenses.
No Oracle required.
Embedded youtube is for 792: Rust Coreutils.
This should be updated if there is a recording of this episode.
Fixed.
Thanks, but no, thanks. I’ll stick to faster languages (and java is notoriously slow to start). For system scripting language (and not for long running apps) that is a dealbreaker.
Have you tried latest modern java versions?
It starts fast enough for most cases.
Of course if you are not writing java daily it isn’t much of a win but if you do much easier to do this as it works on any platform.
Have you really tried to benchmark performance on modern java ?
Look around, and you will find, that it beats Node, Python and more
i’m not gonna watch some talking heads who don’t know how to blog but
it’s a bad idea. it’s simply too hard to install and maintain java to tolerate depending on it for basic system tasks like installing and maintaining java. you wind up installing jre 8 because that’s what most things seem to target, and then installing jre 21 because something wants the newest and then you spend your days fighting to get the different use cases to use whichever version of java they actually work with.
i remember having the same problem with python 2.7, installing one thing would pull in a newer python as a dependency and then everything that didn’t explicitly use 2.7 would implicitly upgrade to 3.0 or whatever and break.
C isn’t immune to this problem of course but all the distributions already do a good job at dependencies on libc and libcpp1. and those packages themselves are relatively monolithic, not a huge framework that has to work just to install them.
though at least java is easier to install than rust / cargo! though i don’t know, as a user, whether that’s a problem…i imagine / hope that rust’s package management only aggressively harms developers.
If you are missing blogs about it see these:
https://www.xam.dk/blog/unleasing-the-scripting-powers-of-java/
https://xam.dk/blog/jbang-everywhere/
And if you would have listened you would have learned that JBang fixes those issues you talk about – makes it trivially easy to install and use Java and in a way that avoids the kind of breakage you mention.
the text on those pages only confirms my exact accusations, in spades.
people invent a system with too many interdependencies and then they “solve” that problem with an “automatic” dependency system. i have gray hairs — i am not going to be fooled by this promise. the more closely integrated the dependency system is with the build and execute, the less well it works. one person got it to work on one computer for one week and then spends the rest of their life insisting that rust’s downsides were solved yesterday (even though this ‘yesterday’ is years after the first ‘yesterday’ they asserted).
i can’t imagine anything worse than branching into a dependency system to run system tasks.
1) jbang is for more than just system tasks. Also useful to simply run existing tools and experiment and hack on code/libraries.
2) javas dependencymechanisn is opposite to system scripting much less reliant on os and defaults to have locked versions so runs are much more predictable and reproducible than traditional scripts.
The mad-lad did it! They created the infamous Java Script!