Download JBang
Note: Java is not required to be installed - JBang will automatically download a Java version
if no Java 8 or higher Java Development Kit (JDK) version is found.
curl/iex
Powershell:
iex "& { $(iwr https://ps.jbang.dev) } app setup"
GitBash/cygwin/mingwin/WSL:
curl -Ls https://sh.jbang.dev | bash -s - app setup
Chocolatey
choco install jbang
Scoop
scoop bucket add jbangdev https://github.com/jbangdev/scoop-bucket scoop install jbang
Manual
Unzip the latest binary release, put the jbang-[version]/bin folder in to your $PATH and you are set.
Zero install
You can run download and run jbang directly using Powershell with:
iex "& { $(iwr https://ps.jbang.dev) } [jbang arguments]"
or if you have bash based shell/terminal:
curl -Ls https://sh.jbang.dev | bash -s - [jbang arguments]
curl
curl -Ls https://sh.jbang.dev | bash -s - app setup
SDKMan
sdk install jbang
asdf
asdf plugin-add jbang asdf install jbang latest
Fedora Copr for CentOS, Fedora, Mageia and OpenSuse
dnf copr enable @jbangdev/jbang dnf install jbang
Manual
Unzip the latest binary release, put the jbang-[version]/bin folder in to your $PATH and you are set.
Zero install
You can run download and run jbang directly using curl -Ls https://sh.jbang.dev | bash -s - [jbang arguments]
curl
curl -Ls https://sh.jbang.dev | bash -s - app setup
SDKMan
sdk install jbang
Homebrew
brew install jbangdev/tap/jbang
asdf
asdf plugin-add jbang asdf install jbang latest
Manual
Unzip the latest binary release, put the jbang-[version]/bin folder in to your $PATH and you are set.
Zero install
You can run jbang directly:
curl -Ls https://sh.jbang.dev | bash -s - [jbang arguments]
docker.io
docker run -v `pwd`:/ws --workdir=/ws jbangdev/jbang-action helloworld.java
Quay.io
docker run -v `pwd`:/ws --workdir=/ws quay.io/jbangdev/jbang-action helloworld.java
setup-jbang action:
- name: Setup JBang
uses: jbangdev/setup-jbang@main
- name: properties
run: |
jbang properties@jbangdev
Install and see details at Github Action Marketplace
Plugin to run jbang as part of a Apache Maven build available from jbang-maven-plugin
<plugin>
<groupId>dev.jbang</groupId>
<artifactId>jbang-maven-plugin</artifactId>
<version>0.0.7</version>
<executions>
<execution>
<id>run</id>
<phase>process-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<script>hello.java</script>
</configuration>
</execution>
</executions>
</plugin>
Plugin to run jbang as part of a Gradle build available from jbang-gradle-plugin
plugins {
id 'dev.jbang' version '0.2.0'
}
Install and use JBang from JavaScript
package.json:{ "scripts": { "test": "node test.js" }, "devDependencies": { "@jbangdev/jbang": "^0.1.4" } }
#! /usr/bin/env node const jbang = require('@jbangdev/jbang'); jbang.exec('properties@jbangdev');
Install and use JBang from Python
requirements.txt:jbang
test.py:#! /usr/bin/env python import jbang jbang.exec('properties@jbangdev')