Table of Contents
jBang
Return to Java developer tools
jbang is a tool for building and running .java/.jsh scripts and jar packages.
Installation on Windows
Installing the following packages:
jbang
By installing, you accept licenses for the packages.
Progress: Downloading jbang 0.92.2… 100%
jbang v0.92.2 [Approved]
jbang package files install completed. Performing other installation steps.
The package jbang wants to run 'chocolateyinstall.ps1'.
Downloading jbang
from 'https://github.com/jbangdev/jbang - /releases/download/v0.92.2/jbang-0.92.2.zip'
Progress: 100% - Completed download of C:\Users\USERNAME\AppData\Local\Temp\chocolatey\jbang\0.92.2\jbang-0.92.2.zip (5.51 MB).
Download of jbang-0.92.2.zip (5.51 MB) completed.
Extracting C:\Users\USERNAME\AppData\Local\Temp\chocolatey\jbang\0.92.2\jbang-0.92.2.zip to \ProgramData\chocolatey\lib\jbang…
C:\ProgramData\chocolatey\lib\jbang
Added C:\ProgramData\chocolatey\bin\jbang.exe shim pointed to '..\lib\jbang\jbang-0.92.2\bin\jbang.cmd'.
The install of jbang was successful.
Software installed to 'C:\ProgramData\chocolatey\lib\jbang'
Chocolatey installed 1/1 packages.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
PS C:\Users\USERNAME> jbang
Help
jbang is a tool for building and running .java/.jsh scripts and jar packages.
Usage: jbang [-hV] [–config=<config>] [–verbose | –quiet] [-o | –fresh]
[COMMAND]
jbang init hello.java [args…] (to initialize a script)
or jbang edit –open=code –live hello.java (to edit a script in IDE with live updates)
or jbang hello.java [args…] (to run a .java file)
or jbang gavsearch@jbangdev [args…] (to run a alias from a catalog)
or jbang group-id:artifact-id:version [args…] (to run a .jar file found with a GAV id)
--config=Path to config file to be used instead of the default --fresh Make sure we use fresh (i.e. non-cached) resources. -h, --help Display help/info. Use 'jbang -h' for detailed usage. -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. -V, --version Display version info (use `jbang --verbose version` for more details) --verbose jbang will be verbose on what it does.
Essentials:
- jbang run Builds and runs provided script.
- jbang build Compiles and stores script in the cache.
Editing:
- jbang init Initialize a script.
- jbang edit Setup a temporary project to edit script in an IDE.
Caching:
- jbang cache Manage compiled scripts in the local cache.
- jbang export Export the result of a build.
- jbang jdk Manage Java Development Kits installed by jbang.
Configuration:
- jbang config Read and write configuration options.
- jbang trust Manage which domains you trust to run scripts from.
- jbang alias Manage aliases for scripts.
- jbang template Manage templates for scripts.
- jbang catalog Manage Catalogs of aliases.
- jbang app Manage scripts installed on the user's PATH as commands.
Other:
- jbang completion Output auto-completion script for bash/zsh. Usage: source <(jbang completion)
- jbang info Provides info about the script for tools (and humans who are
tools).
- jbang version Display version info.
- jbang wrapper Manage jbang wrapper for a folder.
Copyright: 2020-2022 jbang.dev contributors, License: MIT
Website: https://jbang.dev