jbang icon indicating copy to clipboard operation
jbang copied to clipboard

Unleash the power of Java - JBang Lets Students, Educators and Professional Developers create, edit and run self-contained source-only Java programs with unprecedented ease.

= jbang - Unleash the power of Java :idprefix: :idseparator: - ifndef::env-github[] :toc: left :icons: font endif::[] ifdef::env-github[] :toc: macro :caution-caption: :fire: :important-caption: :exclamation: :note-caption: :paperclip: :tip-caption: :bulb: :warning-caption: :warning: endif::[]

image:https://img.shields.io/github/release/jbangdev/jbang.svg[Release,link=https://github.com/jbangdev/jbang/releases] image:https://img.shields.io/github/downloads/jbangdev/jbang/total.svg[Downloads,link=https://hanadigital.github.io/grev/?user=jbangdev&repo=jbang] image:https://github.com/jbangdev/jbang/workflows/ci-build/badge.svg[Build Status,link=https://github.com/jbangdev/jbang/actions] image:https://www.eclipse.org/che/contribute.svg[Che, link=https://che.openshift.io/f?url=https://github.com/jbangdev/jbang] image:https://img.shields.io/badge/Gitpod-Workspace-blue?logo=gitpodp[Gitpod, link=https://gitpod.io/#https://github.com/jbangdev/jbang] image:https://badges.gitter.im/jbangdev/community.svg[Gitter, link=https://gitter.im/jbangdev/community]

image:images/jbang_logo.svg[JBang Logo, title="JBang Logo"]

Want to learn, explore or use Java instantly without setup ?

Do you like Java but use python, groovy, kotlin or similar languages for scripts, experimentation and exploration ?

Ever wanted to just be able to run java from anywhere without any or very minimal setup ? Ever tried out Java 11+ support for running .java files directly in your shell but felt it was a bit too cumbersome ?

Then try jbang which lets you do this:

image:https://asciinema.org/a/4AiobRxUwPUPztCtrDYcmoKjs.svg[link=https://asciinema.org/a/4AiobRxUwPUPztCtrDYcmoKjs?autoplay=true&theme=solarized-dark]

[source, bash]

$ jbang init --template=cli hello.java $ jbang hello.java Max! [jbang] Resolving dependencies... [jbang] Resolving info.picocli:picocli:4.5.0...Done [jbang] Dependencies resolved [jbang] Building jar... Hello Max! $ jbang hello.java -h Usage: hello [-hV] hello made with jbang The greeting to print -h, --help Show this help message and exit. -V, --version Print version information and exit.

Instant cli app generated built using java and picocli as a dependency that was fetched as needed for the compilation and execution.

== AppStore

JBang goes beyond more than just easy scripting; you can use jbang to launch any kind of java application or library packaged as a jar available locally, via http/https download or in a Maven repository. You can even setup catalogs of scripts and publish them to github, gitlab or bitbucket - see https://jbang.dev/appstore[AppStore] for examples.

== Documentation

Full documentation at https://jbang.dev/documentation

== Thanks

jbang was heavily inspired by how https://github.com/holgerbrandl/kscript[kscript] by Holger Brand works.