jbang-run(1)
Name
jbang-run - Builds and runs provided script. (default command)
Synopsis
jbang run -o [-hin] [--[no-]cds] [--ea] [--enable-preview] [--esa] --fresh [--insecure] [--[no-]integrations] [--itr] [--jsh] --quiet --verbose [-c[=<literalScript>]] [--jfr[=<flightRecorderString>]] [--module [=<module>]] [-d[=<String=String>]]… [--build-dir=<buildDir>] [--catalog=<catalog>] [--config=<config>] [-j=<javaVersion>] [-m=<main>] [--source-type=<forceType>] [-C=<compileOptions>]… [--cp=<classpaths>]… [-D=<String=String>]… [--deps=<dependencies>]… [--files=<resources>]… [--javaagent=<String=String>]… [--manifest=<String=String>]… [-N=<nativeOptions>]… [-R=<javaRuntimeOptions>]… [--repos=<repositories>]… [-s=<sources>]… [<scriptOrFile>] [<userParams>…]
Options
- --build-dir=<buildDir>
-
Use given directory for build results
- -c, --code[=<literalScript>]
-
Run the given string as code
- -C, --compile-option=<compileOptions>
-
Options to pass to the compiler
- --catalog=<catalog>
-
Path to catalog file to be used instead of the default
- --[no-]cds
-
If specified Class Data Sharing (CDS) will be used for building and running (requires Java 13+)
- --config=<config>
-
Path to config file to be used instead of the default
- --cp, --class-path=<classpaths>
-
Add class path entries.
- -d, --debug[=<String=String>]
-
Launch with java debug enabled. Set host/port or provide key/value list of JPDA options (default: null)
- -D, <String=String>
-
set a system property
- --deps=<dependencies>
-
Add additional dependencies (Use commas to separate them).
- --ea, --enableassertions
-
Enable assertions
- --enable-preview
-
Activate Java preview features
- --esa, --enablesystemassertions
-
Enable system assertions
- --files=<resources>
-
Add additional files.
- --fresh
-
Make sure we use fresh (i.e. non-cached) resources.
- -h, --help
-
Display help/info. Use 'jbang <command> -h' for detailed usage.
- -i, --interactive
-
Activate interactive mode
- --insecure
-
Enable insecure trust of all SSL certificates.
- --[no-]integrations
-
Enable integration execution (default: true)
- --itr, --ignore-transitive-repositories
-
Ignore remote repositories found in transitive dependencies
- -j, --java=<javaVersion>
-
JDK version to use for running the script.
- --javaagent=<String=String>
- --jfr[=<flightRecorderString>]
-
Launch with Java Flight Recorder enabled.
- --jsh
-
Force input to be interpreted with jsh/jshell. Deprecated: use '--source-type jshell'
- -m, --main=<main>
-
Main class to use when running. Used primarily for running jar’s.
- --manifest=<String=String>
- --module[=<module>]
-
Treat resource as a module. Optionally with the given module name
- -n, --native
-
Build using native-image
- -N, --native-option=<nativeOptions>
-
Options to pass to the native image tool
- -o, --offline
-
Work offline. Fail-fast if dependencies are missing. No connections will be attempted
- --quiet
-
jbang will be quiet, only print when error occurs.
- -R, --java-options, --runtime-option=<javaRuntimeOptions>
-
Options to pass to the Java runtime
- --repos=<repositories>
-
Add additional repositories.
- -s, --sources=<sources>
-
Add additional sources.
- --source-type=<forceType>
-
Force input to be interpreted as the given type. Can be: java, jshell, groovy, kotlin, or markdown
- --verbose
-
jbang will be verbose on what it does.