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
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
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
There are a pre-built github Action you can use in your github workflows:
- name: jbang
uses: jbangdev/jbang-action@v0.70.0
with:
script: createissue.java
scriptargs: "my world"
env:
JBANG_REPO: /root/.jbang/repository
GITHUB_TOKEN: $
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'
}