All apps/JBang

JBang

jbang

A Java launcher for running source files and scripts.

Runs as jbang|macOS, Linux, Windows|www.jbang.dev

Command form

ai-draft · 2 tasks · 9 fields

Run a Java, Kotlin, Groovy or JShell script, jar or app with JBang. Other subcommands (init, build, export, app, catalog, jdk, ...), debugging and profiling options are not covered.

Opens the form; the finished command lands at your prompt, unrun
otty gui jbang
Run a scriptExample values, fixed in this page — nothing here reaches a terminal
Basic
Script, jar or catalog alias*
string
Arguments for the script
string
Extra dependencies
string
Advanced
JVM options
string
TasksEach one presets the form for one job
Run a script
scriptargsdepsruntime_option
Explore in jshell
scriptdepsinteractive
ParametersOnly these flags are editable in the form
Script, jar or catalog alias
Path or URL of the script, a jar, a GAV coordinate or an alias.
string · positional 0
Arguments for the script
string · positional 1 · repeatable
Extra dependencies
Maven coordinates (group:artifact:version), one per entry.
string · repeatable
--deps
JVM options
Passed to the JVM when running the script, for example -Xmx2g.
string · repeatable
--runtime-option
Compiler options
string · repeatable
--compile-option
Main class
string
--main-m
Interactive (jshell)
Explore the script and its dependencies in jshell.
boolean
--interactive
Offline
Fail instead of downloading dependencies that are not cached.
boolean
--offline-o
Class Data Sharing
boolean
--cds
SourcesEvery flag above is checked against these
docs
jbang --deps com.google.gson:gson:2.8.9 app.war jbang --interactive app.war jbang --runtime-option="-Xmx2g" --runtime-option="--enable-preview" myapp.java jbang --compile-option="--enable-preview" --compile-option="-source 17" myapp.java One can also override the main class on the command line by using `--main <name>` or `-m <name>` `jbang -o` or `jbang --of…
manualmain 2026-10-27

raw.githubusercontent.com

Before it fills your prompt, Otty checks the installed jbang against its version. A form that does not match your version is not offered.