Get the latest tech news
JRuby with JBang
Rocky Jaiswal - Technical blogs
As the days melt into each other and us developers find some free time and venture into Advent of Code and similar shenanigans, I stumbled upon JBang which allows us to run Java (or Kotlin / Groovy) programs with one command. So I shelved the idea of using Java ecosystem libraries with JRuby, even though this setup holds a lot of horsepower under the hood specially with recent innovations like Virtual Threads on the JVM. I have added some code at the top of this Java program to download dependencies and with some CLASSPATH magic set, we can invoke the "jruby" binary and run a simple script like -
Or read this on Hacker News