Unpacking Software Livestream

Join our monthly Unpacking Software livestream to hear about the latest news, chat and opinion on packaging, software deployment and lifecycle management!

Learn More

Chocolatey Product Spotlight

Join the Chocolatey Team on our regular monthly stream where we put a spotlight on the most recent Chocolatey product releases. You'll have a chance to have your questions answered in a live Ask Me Anything format.

Learn More

Chocolatey Coding Livestream

Join us for the Chocolatey Coding Livestream, where members of our team dive into the heart of open source development by coding live on various Chocolatey projects. Tune in to witness real-time coding, ask questions, and gain insights into the world of package management. Don't miss this opportunity to engage with our team and contribute to the future of Chocolatey!

Learn More

Calling All Chocolatiers! Whipping Up Windows Automation with Chocolatey Central Management

Webinar from
Wednesday, 17 January 2024

We are delighted to announce the release of Chocolatey Central Management v0.12.0, featuring seamless Deployment Plan creation, time-saving duplications, insightful Group Details, an upgraded Dashboard, bug fixes, user interface polishing, and refined documentation. As an added bonus we'll have members of our Solutions Engineering team on-hand to dive into some interesting ways you can leverage the new features available!

Watch On-Demand
Chocolatey Community Coffee Break

Join the Chocolatey Team as we discuss all things Community, what we do, how you can get involved and answer your Chocolatey questions.

Watch The Replays
Chocolatey and Intune Overview

Webinar Replay from
Wednesday, 30 March 2022

At Chocolatey Software we strive for simple, and teaching others. Let us teach you just how simple it could be to keep your 3rd party applications updated across your devices, all with Intune!

Watch On-Demand
Chocolatey For Business. In Azure. In One Click.

Livestream from
Thursday, 9 June 2022

Join James and Josh to show you how you can get the Chocolatey For Business recommended infrastructure and workflow, created, in Azure, in around 20 minutes.

Watch On-Demand
The Future of Chocolatey CLI

Livestream from
Thursday, 04 August 2022

Join Paul and Gary to hear more about the plans for the Chocolatey CLI in the not so distant future. We'll talk about some cool new features, long term asks from Customers and Community and how you can get involved!

Watch On-Demand
Hacktoberfest Tuesdays 2022

Livestreams from
October 2022

For Hacktoberfest, Chocolatey ran a livestream every Tuesday! Re-watch Cory, James, Gary, and Rain as they share knowledge on how to contribute to open-source projects such as Chocolatey CLI.

Watch On-Demand

Downloads:

28,234

Downloads of v 0.85.1:

73

Last Update:

28 Dec 2021

Package Maintainer(s):

Software Author(s):

  • Max Rydahl Andersen

Tags:

jbang bash java shell scripting

JBang

This is not the latest version of JBang available.

  • 1
  • 2
  • 3

0.85.1 | Updated: 28 Dec 2021

Downloads:

28,234

Downloads of v 0.85.1:

73

Maintainer(s):

Software Author(s):

  • Max Rydahl Andersen

JBang 0.85.1

This is not the latest version of JBang available.

  • 1
  • 2
  • 3

All Checks are Passing

3 Passing Tests


Validation Testing Passed


Verification Testing Passed

Details

Scan Testing Successful:

No detections found in any package files

Details
Learn More

Deployment Method: Individual Install, Upgrade, & Uninstall

To install JBang, run the following command from the command line or from PowerShell:

>

To upgrade JBang, run the following command from the command line or from PowerShell:

>

To uninstall JBang, run the following command from the command line or from PowerShell:

>

Deployment Method:

NOTE

This applies to both open source and commercial editions of Chocolatey.

1. Enter Your Internal Repository Url

(this should look similar to https://community.chocolatey.org/api/v2/)


2. Setup Your Environment

1. Ensure you are set for organizational deployment

Please see the organizational deployment guide

2. Get the package into your environment

  • Open Source or Commercial:
    • Proxy Repository - Create a proxy nuget repository on Nexus, Artifactory Pro, or a proxy Chocolatey repository on ProGet. Point your upstream to https://community.chocolatey.org/api/v2/. Packages cache on first access automatically. Make sure your choco clients are using your proxy repository as a source and NOT the default community repository. See source command for more information.
    • You can also just download the package and push it to a repository Download

3. Copy Your Script

choco upgrade jbang -y --source="'INTERNAL REPO URL'" --version="'0.85.1'" [other options]

See options you can pass to upgrade.

See best practices for scripting.

Add this to a PowerShell script or use a Batch script with tools and in places where you are calling directly to Chocolatey. If you are integrating, keep in mind enhanced exit codes.

If you do use a PowerShell script, use the following to ensure bad exit codes are shown as failures:


choco upgrade jbang -y --source="'INTERNAL REPO URL'" --version="'0.85.1'" 
$exitCode = $LASTEXITCODE

Write-Verbose "Exit code was $exitCode"
$validExitCodes = @(0, 1605, 1614, 1641, 3010)
if ($validExitCodes -contains $exitCode) {
  Exit 0
}

Exit $exitCode

- name: Install jbang
  win_chocolatey:
    name: jbang
    version: '0.85.1'
    source: INTERNAL REPO URL
    state: present

See docs at https://docs.ansible.com/ansible/latest/modules/win_chocolatey_module.html.


chocolatey_package 'jbang' do
  action    :install
  source   'INTERNAL REPO URL'
  version  '0.85.1'
end

See docs at https://docs.chef.io/resource_chocolatey_package.html.


cChocoPackageInstaller jbang
{
    Name     = "jbang"
    Version  = "0.85.1"
    Source   = "INTERNAL REPO URL"
}

Requires cChoco DSC Resource. See docs at https://github.com/chocolatey/cChoco.


package { 'jbang':
  ensure   => '0.85.1',
  provider => 'chocolatey',
  source   => 'INTERNAL REPO URL',
}

Requires Puppet Chocolatey Provider module. See docs at https://forge.puppet.com/puppetlabs/chocolatey.


4. If applicable - Chocolatey configuration/installation

See infrastructure management matrix for Chocolatey configuration elements and examples.

NOTE

Private CDN cached downloads available for licensed customers. Never experience 404 breakages again! Learn more...

Package Approved

This package was approved as a trusted package on 28 Dec 2021.

Description

Want to learn or explore Java instantly without setup ?

Do you like Java but uses python, groovy, kotlin or similar languages for your scripts ?

Ever tried out Java 11+ support for running .java files directly in your shell but felt it was a bit too cumbersome ?

Then try jbang which lets you do this:

asciicast

$ jbang --init=cli hello.java
$ jbang hello.java Max!
[jbang] Resolving dependencies...
[jbang] Resolving info.picocli:picocli:4.5.0...Done
[jbang] Dependencies resolved
[jbang] Building jar...
Hello Max!
$ jbang hello.java -h
Usage: hello [-hV] <greeting>
hello made with jbang
<greeting> The greeting to print
-h, --help Show this help message and exit.
-V, --version Print version information and exit.

Instant cli app generated built using java and picocli as a dependency that was fetched as needed for the compilation and execution.

Features

  • .java Scripting for Java 8 and upwards
  • .jsh via JShell from Java 9 and upwards
  • Works on icon:windows[] Windows, icon:apple[] OSX and icon:linux[] Linux
  • Install using SDKMan (icon:apple[]/icon:linux[]), Homebrew (icon:apple[]), Chocolatey (icon:windows[]) or Scoop (icon:windows[])
  • Dependency declarations using //DEPS &lt;gav&gt; for automatic dependency resolution
  • Control compile and runtime options with //JAVAC_OPTIONS &lt;flags&gt; and //JAVA_OPTIONS &lt;flags&gt;
  • Compiled jar and Dependency resolution caching
  • Launch with debug enabled for instant debugging from your favorite IDE
  • Init templates to get started easily (jbang --init=cli hello.java)
  • Generate gradle and IDE config with dependencies for easy editing in your favorite IDE (jbang edit myfile.java)
  • (PLANNED) Lookup dependencies with a short-hand name, i.e. // DEPS log4j:1.2+,picocli for quick getting started.

To use it simply install jbang and run jbang yourscript.java


tools\chocolateyinstall.ps1
$tools = Split-Path $MyInvocation.MyCommand.Definition
$package = Split-Path $tools
$jbang_home = Join-Path $package 'jbang-0.85.1'
$jbang_bat = Join-Path $jbang_home 'bin/jbang.cmd'

Install-ChocolateyZipPackage `
    -PackageName 'jbang' `
    -Url 'https://github.com/jbangdev/jbang/releases/download/v0.85.1/jbang-0.85.1.zip' `
    -Checksum 'b59cae3adf4b17c2f15180ad55b6f40007acfcf602ce2dc6940c5a9dfb9de5c6' `
    -ChecksumType 'sha256' `
    -UnzipLocation $package

Install-BinFile -Name 'jbang' -Path $jbang_bat
tools\chocolateyuninstall.ps1
$tools = Split-Path $MyInvocation.MyCommand.Definition
$package = Split-Path $tools
$jbang_home = Join-Path $package 'jbang-0.85.1'
$jbang_bat = Join-Path $jbang_home 'bin/jbang.cmd'

Uninstall-BinFile -Name 'jbang' -Path $jbang_bat
tools\LICENSE.txt
From: https://raw.githubusercontent.com/jbangdev/jbang/HEAD/LICENSE

MIT License

Copyright (c) 2020 Max Rydahl Andersen

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
tools\VERIFICATION.txt

VERIFICATION
Verification is intended to assist the Chocolatey moderators and community
in verifying that this package's contents are trustworthy.
 
You can verify the files are same as the one coming from the main repo
at https://github.com/jbangdev/jbang/releases.

Log in or click on link to see number of positives.

In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).

Chocolatey Pro provides runtime protection from possible malware.

Add to Builder Version Downloads Last Updated Status
JBang 0.114.0 3058 Saturday, December 9, 2023 Approved
JBang 0.113.0 512 Friday, November 24, 2023 Approved
JBang 0.112.4 328 Sunday, November 19, 2023 Approved
JBang 0.111.0 1554 Saturday, September 30, 2023 Approved
JBang 0.110.1 1066 Thursday, August 17, 2023 Approved
JBang 0.110.0 1062 Sunday, July 23, 2023 Approved
JBang 0.109.0 253 Saturday, July 8, 2023 Approved
JBang 0.108.0 907 Saturday, June 10, 2023 Approved
JBang 0.107.0 1331 Tuesday, May 16, 2023 Approved
JBang 0.106.3 608 Sunday, April 16, 2023 Approved
JBang 0.106.1 154 Saturday, April 1, 2023 Approved
JBang 0.105.2 119 Friday, March 24, 2023 Approved
JBang 0.105.1 143 Monday, March 20, 2023 Approved
JBang 0.104.0 172 Friday, February 24, 2023 Approved
JBang 0.103.2 68 Sunday, February 19, 2023 Approved
JBang 0.103.1 65 Tuesday, February 14, 2023 Approved
JBang 0.103.0 74 Saturday, February 11, 2023 Approved
JBang 0.102.0 143 Wednesday, January 18, 2023 Approved
JBang 0.101.0 236 Friday, November 25, 2022 Approved
JBang 0.100.1 85 Thursday, November 17, 2022 Approved
JBang 0.100.0 155 Tuesday, November 8, 2022 Approved
JBang 0.99.1 163 Thursday, October 13, 2022 Approved
JBang 0.98.0 242 Friday, September 2, 2022 Approved
JBang 0.97.0 213 Wednesday, August 10, 2022 Approved
JBang 0.96.3 74 Wednesday, August 3, 2022 Approved
JBang 0.96.1 56 Tuesday, August 2, 2022 Approved
JBang 0.96.0 144 Thursday, July 14, 2022 Approved
JBang 0.95.0 188 Thursday, June 9, 2022 Approved
JBang 0.94.0 160 Friday, May 13, 2022 Approved
JBang 0.92.2 198 Sunday, March 20, 2022 Approved
JBang 0.92.1 63 Saturday, March 19, 2022 Approved
JBang 0.92.0 53 Friday, March 18, 2022 Approved
JBang 0.91.0 89 Thursday, March 10, 2022 Approved
JBang 0.90.2 86 Thursday, March 3, 2022 Approved
JBang 0.90.1 118 Sunday, February 20, 2022 Approved
JBang 0.90.0 74 Friday, February 18, 2022 Approved
JBang 0.88.0 113 Friday, February 4, 2022 Approved
JBang 0.87.0 101 Friday, January 21, 2022 Approved
JBang 0.86.0 165 Sunday, January 2, 2022 Approved
JBang 0.85.1 73 Tuesday, December 28, 2021 Approved
JBang 0.85.0 79 Friday, December 24, 2021 Approved
JBang 0.84.2 126 Saturday, December 11, 2021 Approved
JBang 0.84.1 50 Friday, December 10, 2021 Approved
JBang 0.83.1 159 Saturday, November 13, 2021 Approved
JBang 0.83.0 61 Wednesday, November 3, 2021 Approved
JBang 0.82.1 108 Sunday, October 31, 2021 Approved
JBang 0.82.0 64 Saturday, October 30, 2021 Approved
JBang 0.81.2 129 Thursday, October 7, 2021 Approved
JBang 0.81.1 89 Monday, October 4, 2021 Approved
JBang 0.81.0 85 Saturday, October 2, 2021 Approved
JBang 0.80.2 108 Thursday, September 23, 2021 Approved
j'bang 0.80.1 75 Tuesday, September 21, 2021 Approved
j'bang 0.80.0 68 Tuesday, September 21, 2021 Approved
j'bang 0.77.0 180 Thursday, July 15, 2021 Approved
j'bang 0.72.0 118 Friday, June 25, 2021 Approved
j'bang 0.71.1 149 Tuesday, May 25, 2021 Approved
j'bang 0.70.0 154 Thursday, April 8, 2021 Approved
j'bang 0.69.2 109 Thursday, March 25, 2021 Approved
j'bang 0.69.1 119 Wednesday, March 24, 2021 Approved
j'bang 0.68.0 98 Saturday, March 20, 2021 Approved
j'bang 0.67.3 109 Sunday, March 14, 2021 Approved
j'bang 0.67.2 73 Saturday, March 13, 2021 Approved
j'bang 0.67.1 120 Sunday, March 7, 2021 Approved
j'bang 0.67.0 96 Thursday, March 4, 2021 Approved
j'bang 0.66.1 150 Monday, February 15, 2021 Approved
j'bang 0.66.0 112 Friday, February 12, 2021 Approved
j'bang 0.65.1 106 Friday, February 5, 2021 Approved
j'bang 0.65.0 87 Friday, February 5, 2021 Approved
j'bang 0.64.0 105 Thursday, February 4, 2021 Approved
j'bang 0.63.0 143 Sunday, January 24, 2021 Approved
j'bang 0.62.0 105 Sunday, January 17, 2021 Approved
j'bang 0.61.1 106 Thursday, January 14, 2021 Approved
j'bang 0.61.0 112 Thursday, January 14, 2021 Approved
j'bang 0.60.0 112 Sunday, January 10, 2021 Approved
j'bang 0.59.0 133 Friday, January 8, 2021 Approved
j'bang 0.58.0 111 Sunday, January 3, 2021 Approved
j'bang 0.57.0 110 Monday, December 28, 2020 Approved
j'bang 0.56.0 132 Sunday, December 6, 2020 Approved
j'bang 0.55.2 102 Tuesday, December 1, 2020 Approved
j'bang 0.55.1 125 Thursday, November 26, 2020 Approved
j'bang 0.55.0 112 Thursday, November 26, 2020 Approved
j'bang 0.54.1 88 Tuesday, November 24, 2020 Approved
j'bang 0.54.0 104 Sunday, November 22, 2020 Approved
j'bang 0.53.2 133 Monday, November 9, 2020 Approved
j'bang 0.53.1 107 Sunday, November 8, 2020 Approved
j'bang 0.53.0 106 Saturday, November 7, 2020 Approved
j'bang 0.52.1 114 Monday, October 26, 2020 Approved
j'bang 0.52.0 132 Thursday, October 15, 2020 Approved
j'bang 0.51.1 111 Monday, October 12, 2020 Approved
j'bang 0.51.0 122 Saturday, October 10, 2020 Approved
j'bang 0.50.1 108 Friday, October 9, 2020 Approved
j'bang 0.50.0 116 Thursday, October 8, 2020 Approved
j'bang 0.49.0 94 Tuesday, October 6, 2020 Approved
j'bang 0.48.0 138 Thursday, September 24, 2020 Approved
j'bang 0.47.1 139 Monday, September 21, 2020 Approved
j'bang 0.47.0 101 Monday, September 21, 2020 Approved
j'bang 0.46.1 107 Sunday, September 20, 2020 Approved
j'bang 0.46.0 101 Sunday, September 20, 2020 Approved
j'bang 0.45.0 128 Friday, September 11, 2020 Approved
j'bang 0.44.2 109 Tuesday, September 8, 2020 Approved
j'bang 0.44.0 107 Tuesday, September 8, 2020 Approved
j'bang 0.43.0 128 Wednesday, September 2, 2020 Approved
j'bang 0.42.1 112 Wednesday, September 2, 2020 Approved
j'bang 0.42.0 127 Sunday, August 30, 2020 Approved
j'bang 0.41.0 118 Sunday, August 30, 2020 Approved
j'bang 0.40.1 119 Thursday, August 27, 2020 Approved
j'bang 0.40.0 112 Thursday, August 27, 2020 Approved
j'bang 0.39.0 125 Sunday, August 23, 2020 Approved
j'bang 0.38.0 143 Tuesday, August 18, 2020 Approved
j'bang 0.37.0 124 Monday, August 17, 2020 Approved
j'bang 0.36.1 146 Sunday, August 2, 2020 Approved
j'bang 0.36.0 109 Saturday, August 1, 2020 Approved
j'bang 0.35.1 114 Friday, July 31, 2020 Approved
j'bang 0.35.0 114 Friday, July 31, 2020 Approved
j'bang 0.34.1 107 Tuesday, July 28, 2020 Approved
j'bang 0.34.0 134 Sunday, July 26, 2020 Approved
j'bang 0.33.0 133 Tuesday, July 7, 2020 Approved
j'bang 0.32.0 144 Saturday, June 20, 2020 Approved
j'bang 0.31.0 120 Sunday, June 14, 2020 Approved
j'bang 0.30.0 123 Friday, June 12, 2020 Approved
j'bang 0.29.1 119 Saturday, June 6, 2020 Approved
j'bang 0.29.0 124 Saturday, June 6, 2020 Approved
j'bang 0.28.0 109 Thursday, June 4, 2020 Approved
j'bang 0.27.0 139 Monday, June 1, 2020 Approved
j'bang 0.26.0 127 Sunday, May 31, 2020 Approved
j'bang 0.25.0 114 Thursday, May 28, 2020 Approved
j'bang 0.24.0 115 Thursday, May 21, 2020 Approved
j'bang 0.23.0 115 Saturday, May 16, 2020 Approved
j'bang 0.22.0.2 158 Thursday, April 16, 2020 Approved
j'bang 0.21.0 133 Friday, April 10, 2020 Approved
j'bang 0.20.0 161 Sunday, March 22, 2020 Approved
j'bang 0.19.0 161 Thursday, March 5, 2020 Approved
j'bang 0.18.0 133 Saturday, February 29, 2020 Approved
j'bang 0.17.0 144 Monday, February 24, 2020 Approved
j'bang 0.16.2 160 Saturday, February 22, 2020 Approved
j'bang 0.16.1 140 Sunday, February 16, 2020 Approved
j'bang 0.16.0 150 Saturday, February 15, 2020 Approved
j'bang 0.15.1 154 Saturday, February 15, 2020 Approved
j'bang 0.15.0 112 Thursday, February 13, 2020 Approved
j'bang 0.14.2 164 Sunday, February 9, 2020 Approved
j'bang 0.14.1 134 Saturday, February 8, 2020 Approved
j'bang 0.14.0 155 Tuesday, February 4, 2020 Approved
j'bang 0.13.2 127 Wednesday, January 29, 2020 Approved
j'bang 0.13.1 136 Wednesday, January 29, 2020 Approved
j'bang 0.13.0 181 Wednesday, January 29, 2020 Approved
jbang 0.12.2 111 Saturday, January 25, 2020 Approved
jbang 0.12.1 134 Saturday, January 25, 2020 Approved
jbang 0.11.1 109 Wednesday, January 22, 2020 Approved
jbang 0.11.0 115 Wednesday, January 22, 2020 Approved
jbang 0.6.0.5 126 Sunday, January 19, 2020 Approved

This package has no dependencies.

Discussion for the JBang Package

Ground Rules:

  • This discussion is only about JBang and the JBang package. If you have feedback for Chocolatey, please contact the Google Group.
  • This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
  • The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
  • Tell us what you love about the package or JBang, or tell us what needs improvement.
  • Share your experiences with the package, or extra configuration or gotchas that you've found.
  • If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.
comments powered by Disqus