JBang, a Java file to rule them all? 💍
summary
Demo shows JBang (installed via SDKMAN/brew/curl, version JBang 0.137) turning a ten‑line HelloWorld into a runnable script by building an executable jar on demand and supporting shebang install so the file runs like a normal command. Adds Maven-style deps (demo uses LangChain4j and Logback), file packing for logback.xml, installs aliases, and pulls scripts/catalogs from GitHub. Notes JDK 11 single‑file limits (improved by JDK 25), installs scripts globally and the demos all run; GraalVM native build is possible but not favored for readable scripts.
AI-written summary · about
chapters (14)
- 0:00JBang introduction
- 2:41Why JBang for scripting
- 3:25Installing JBang scripts
- 4:52Shebang execution
- 6:35Single-file vs JBang
- 6:58Adding dependencies
- 8:24IDE integration
- 9:07Global script install
- 9:50GitHub script sharing
- 10:33Aliases and catalogs
- 12:23Custom catalogs
- 14:06Simplifying Java
- 15:51Advanced features
- 16:56Q&A
related talks
20mJBang, a Java File to Rule Them All? 💍
16mJBang, One Java File to Rule Them All? 💍
32mjbang - Unleash the power of Java
47mJava for Small Coding Tasks
14mShare Your Java CLI Apps with Ease
16mHaving fun with Pi4J and JBang on the Raspberry Pi
44mJava, Life is Short!
51mThe Best of Java Shorts Show: 100 Snippets in 50 Minutes
