The Scripting Dilemma If you're like me, as a Java developer, you struggle to remember bash or python syntax for quick scripts. You end up "vibe coding" it, then struggle again when you need to adapt it. If only you could write it in Java! You might say "Java is not for scripting" and "Iโ€ฆ...
#CLIscript #Java #Javascripting #JBang #PicoCLI #script
https://foojay.io/today/java-for-scripting/
How to Use Java as a Scripting Language

Discover how Java has evolved into a powerful scripting language, eliminating boilerplate and enabling instant execution for automation tasks

foojay

AI agents behave much more like terminal users than API clients.

So itโ€™s not surprising that CLI tools often outperform MCP integrations for many workflows.

For Java developers this opens an interesting path:
JBang + small CLI tools as agent capabilities.

I wrote a deep dive here:

https://www.the-main-thread.com/p/ai-agents-cli-tools-jbang-java-architects

#Java #AI #DevTools #JBang #AIagents

Most Java CLI tools stop at mvn compile exec:java.

That works locally. It doesnโ€™t scale.

In this guide I show how to:
- build a fat JAR
- automate GitHub releases
- publish a JBang catalog
- install with one command

No cloning. No Maven required.

Full tutorial:
https://www.the-main-thread.com/p/ship-java-cli-jreleaser-jbang-github-release

#Java #JReleaser #JBang #Maven #OpenSource

@aalmiray I should have followed mastodon more closely; we could have exchanged about #JBang and/or #Gradle at #JavaLand. Maybe next year. ๐Ÿ˜…

RE: https://mastodon.social/@borkdude/116115371711348205

"Cream can run .java source files directly, compiling and caching them automatically. This makes it a fast alternative to #JBang."

#clojure #java #babashka

Java still feels โ€œtoo heavyโ€ for quick learning? @igfasouza shows how #Java25 + #JEP512, #JBang & notebooks make experimentation fastโ€”then connects it to real hardware via #RaspberryPi + #GraalPy.

Try the stack: https://javapro.io/2026/01/15/java-25-jep-512-jbang-notebooks-graallpy-and-raspberry-pi-for-interactive-learning/

#Agent #skills help ๐—ฎ๐˜‚๐˜๐—ผ๐—บ๐—ฎ๐˜๐—ฒ ๐—ฟ๐—ฒ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐˜๐—ฎ๐˜€๐—ธ๐˜€.

Recently I used #GeminiCLI to easily create #MCP servers in #Java with #jbang & #LangChain4j

I extracted that ๐—ธ๐—ป๐—ผ๐˜„๐—น๐—ฒ๐—ฑ๐—ด๐—ฒ into a ๐—ฟ๐—ฒ๐˜‚๐˜€๐—ฎ๐—ฏ๐—น๐—ฒ SKILL.md to create more servers!

https://glaforge.dev/posts/2026/02/21/easily-build-a-local-mcp-server-in-java-with-a-skill-in-gemini-cli/

Easily Build a Local MCP Server in Java with a Skill inside Gemini CLI

Tech blog of Guillaume Laforge, with articles on generative AI, LLMs, cloud computing, microservices architecture, serverless solutions, Java and Apache Groovy programming

๐Ÿ’ช Zero Boilerplate #Java STDIO #MCP Servers with #LangChain4j and #jbang

You just need a single Java file.
JBang installed.
No build! No project structure. Nothing else.

Then configure your custom MCP server to use with your favorite #AI #Agent harness, like #geminicli & friends!

The #langchain4j project recently added a simple #MCP STDIO server.
So you don't need the big guns like
@quarkusio @micronaut & friends for simple MCP servers.

https://glaforge.dev/posts/2026/02/11/zero-boilerplate-java-stdio-mcp-servers-with-langchain4j-and-jbang/

For years we accepted a trade-off: Python for scripts, Java for systems.

With JBang and Java 21, that trade-off is gone.

You can now write single-file Java scripts with near-zero friction and promote them to production without a rewrite.

Hands-on examples: HTTP servers, CLIs, async clients, matrix math.

https://www.the-main-thread.com/p/java-is-the-new-python-jbang-java-21

#Java #JBang #Java21 #DevExperience #SoftwareEngineering #JVM