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:

38,965

Downloads of v 0.119.0:

1,626

Last Update:

27 Sep 2024

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.119.0 | Updated: 27 Sep 2024

Downloads:

38,965

Downloads of v 0.119.0:

1,626

Maintainer(s):

Software Author(s):

  • Max Rydahl Andersen

JBang 0.119.0

This is not the latest version of JBang available.

Legal Disclaimer: Neither this package nor Chocolatey Software, Inc. are affiliated with or endorsed by Max Rydahl Andersen. The inclusion of Max Rydahl Andersen trademark(s), if any, upon this webpage is solely to identify Max Rydahl Andersen goods or services and not for commercial purposes.

  • 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.119.0'" [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.119.0'" 
$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.119.0'
    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.119.0'
end

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


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

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


package { 'jbang':
  ensure   => '0.119.0',
  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 06 Nov 2024.

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.6.3...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 //COMPILE_OPTIONS &lt;flags&gt; and //RUNTIME_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.119.0'
$jbang_bat = Join-Path $jbang_home 'bin/jbang.cmd'

Install-ChocolateyZipPackage `
    -PackageName 'jbang' `
    -Url 'https://github.com/jbangdev/jbang/releases/download/v0.119.0/jbang-0.119.0.zip' `
    -Checksum '31876cc1ac9c5ecc531fe8c3abf255e78faf93c11ceb0a7f4cc819f8ada7f4c6' `
    -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.119.0'
$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.120.4 9 Saturday, November 16, 2024 Approved
JBang 0.119.0 1626 Friday, September 27, 2024 Approved
JBang 0.118.0 432 Thursday, September 12, 2024 Approved
JBang 0.117.1 2400 Sunday, July 7, 2024 Approved
JBang 0.117.0 20 Sunday, July 7, 2024 Approved
JBang 0.116.0 3282 Monday, April 1, 2024 Approved
JBang 0.115.0 626 Saturday, March 9, 2024 Approved
JBang 0.114.0 3079 Saturday, December 9, 2023 Approved
JBang 0.113.0 526 Friday, November 24, 2023 Approved
JBang 0.112.4 341 Sunday, November 19, 2023 Approved
JBang 0.111.0 1573 Saturday, September 30, 2023 Approved
JBang 0.110.1 1087 Thursday, August 17, 2023 Approved
JBang 0.110.0 1079 Sunday, July 23, 2023 Approved
JBang 0.109.0 275 Saturday, July 8, 2023 Approved
JBang 0.108.0 922 Saturday, June 10, 2023 Approved
JBang 0.107.0 1345 Tuesday, May 16, 2023 Approved
JBang 0.106.3 629 Sunday, April 16, 2023 Approved
JBang 0.106.1 167 Saturday, April 1, 2023 Approved
JBang 0.105.2 139 Friday, March 24, 2023 Approved
JBang 0.105.1 160 Monday, March 20, 2023 Approved
JBang 0.104.0 189 Friday, February 24, 2023 Approved
JBang 0.103.2 79 Sunday, February 19, 2023 Approved
JBang 0.103.1 78 Tuesday, February 14, 2023 Approved
JBang 0.103.0 92 Saturday, February 11, 2023 Approved
JBang 0.102.0 154 Wednesday, January 18, 2023 Approved
JBang 0.101.0 249 Friday, November 25, 2022 Approved
JBang 0.100.1 96 Thursday, November 17, 2022 Approved
JBang 0.100.0 172 Tuesday, November 8, 2022 Approved
JBang 0.99.1 183 Thursday, October 13, 2022 Approved
JBang 0.98.0 266 Friday, September 2, 2022 Approved
JBang 0.97.0 229 Wednesday, August 10, 2022 Approved
JBang 0.96.3 87 Wednesday, August 3, 2022 Approved
JBang 0.96.1 72 Tuesday, August 2, 2022 Approved
JBang 0.96.0 156 Thursday, July 14, 2022 Approved
JBang 0.95.0 210 Thursday, June 9, 2022 Approved
JBang 0.94.0 177 Friday, May 13, 2022 Approved
JBang 0.92.2 211 Sunday, March 20, 2022 Approved
JBang 0.92.1 89 Saturday, March 19, 2022 Approved
JBang 0.92.0 72 Friday, March 18, 2022 Approved
JBang 0.91.0 103 Thursday, March 10, 2022 Approved
JBang 0.90.2 98 Thursday, March 3, 2022 Approved
JBang 0.90.1 135 Sunday, February 20, 2022 Approved
JBang 0.90.0 90 Friday, February 18, 2022 Approved
JBang 0.88.0 128 Friday, February 4, 2022 Approved
JBang 0.87.0 114 Friday, January 21, 2022 Approved
JBang 0.86.0 189 Sunday, January 2, 2022 Approved
JBang 0.85.1 88 Tuesday, December 28, 2021 Approved
JBang 0.85.0 95 Friday, December 24, 2021 Approved
JBang 0.84.2 142 Saturday, December 11, 2021 Approved
JBang 0.84.1 60 Friday, December 10, 2021 Approved
JBang 0.83.1 174 Saturday, November 13, 2021 Approved
JBang 0.83.0 71 Wednesday, November 3, 2021 Approved
JBang 0.82.1 122 Sunday, October 31, 2021 Approved
JBang 0.82.0 84 Saturday, October 30, 2021 Approved
JBang 0.81.2 142 Thursday, October 7, 2021 Approved
JBang 0.81.1 104 Monday, October 4, 2021 Approved
JBang 0.81.0 102 Saturday, October 2, 2021 Approved
JBang 0.80.2 120 Thursday, September 23, 2021 Approved
j'bang 0.80.1 90 Tuesday, September 21, 2021 Approved
j'bang 0.80.0 78 Tuesday, September 21, 2021 Approved
j'bang 0.77.0 194 Thursday, July 15, 2021 Approved
j'bang 0.72.0 138 Friday, June 25, 2021 Approved
j'bang 0.71.1 163 Tuesday, May 25, 2021 Approved
j'bang 0.70.0 172 Thursday, April 8, 2021 Approved
j'bang 0.69.2 124 Thursday, March 25, 2021 Approved
j'bang 0.69.1 131 Wednesday, March 24, 2021 Approved
j'bang 0.68.0 117 Saturday, March 20, 2021 Approved
j'bang 0.67.3 124 Sunday, March 14, 2021 Approved
j'bang 0.67.2 89 Saturday, March 13, 2021 Approved
j'bang 0.67.1 139 Sunday, March 7, 2021 Approved
j'bang 0.67.0 112 Thursday, March 4, 2021 Approved
j'bang 0.66.1 170 Monday, February 15, 2021 Approved
j'bang 0.66.0 130 Friday, February 12, 2021 Approved
j'bang 0.65.1 130 Friday, February 5, 2021 Approved
j'bang 0.65.0 98 Friday, February 5, 2021 Approved
j'bang 0.64.0 120 Thursday, February 4, 2021 Approved
j'bang 0.63.0 159 Sunday, January 24, 2021 Approved
j'bang 0.62.0 121 Sunday, January 17, 2021 Approved
j'bang 0.61.1 128 Thursday, January 14, 2021 Approved
j'bang 0.61.0 143 Thursday, January 14, 2021 Approved
j'bang 0.60.0 129 Sunday, January 10, 2021 Approved
j'bang 0.59.0 149 Friday, January 8, 2021 Approved
j'bang 0.58.0 125 Sunday, January 3, 2021 Approved
j'bang 0.57.0 126 Monday, December 28, 2020 Approved
j'bang 0.56.0 147 Sunday, December 6, 2020 Approved
j'bang 0.55.2 117 Tuesday, December 1, 2020 Approved
j'bang 0.55.1 151 Thursday, November 26, 2020 Approved
j'bang 0.55.0 126 Thursday, November 26, 2020 Approved
j'bang 0.54.1 108 Tuesday, November 24, 2020 Approved
j'bang 0.54.0 119 Sunday, November 22, 2020 Approved
j'bang 0.53.2 147 Monday, November 9, 2020 Approved
j'bang 0.53.1 125 Sunday, November 8, 2020 Approved
j'bang 0.53.0 118 Saturday, November 7, 2020 Approved
j'bang 0.52.1 129 Monday, October 26, 2020 Approved
j'bang 0.52.0 147 Thursday, October 15, 2020 Approved
j'bang 0.51.1 126 Monday, October 12, 2020 Approved
j'bang 0.51.0 138 Saturday, October 10, 2020 Approved
j'bang 0.50.1 124 Friday, October 9, 2020 Approved
j'bang 0.50.0 134 Thursday, October 8, 2020 Approved
j'bang 0.49.0 108 Tuesday, October 6, 2020 Approved
j'bang 0.48.0 155 Thursday, September 24, 2020 Approved
j'bang 0.47.1 152 Monday, September 21, 2020 Approved
j'bang 0.47.0 116 Monday, September 21, 2020 Approved
j'bang 0.46.1 130 Sunday, September 20, 2020 Approved
j'bang 0.46.0 118 Sunday, September 20, 2020 Approved
j'bang 0.45.0 147 Friday, September 11, 2020 Approved
j'bang 0.44.2 128 Tuesday, September 8, 2020 Approved
j'bang 0.44.0 123 Tuesday, September 8, 2020 Approved
j'bang 0.43.0 145 Wednesday, September 2, 2020 Approved
j'bang 0.42.1 126 Wednesday, September 2, 2020 Approved
j'bang 0.42.0 139 Sunday, August 30, 2020 Approved
j'bang 0.41.0 132 Sunday, August 30, 2020 Approved
j'bang 0.40.1 135 Thursday, August 27, 2020 Approved
j'bang 0.40.0 129 Thursday, August 27, 2020 Approved
j'bang 0.39.0 142 Sunday, August 23, 2020 Approved
j'bang 0.38.0 165 Tuesday, August 18, 2020 Approved
j'bang 0.37.0 136 Monday, August 17, 2020 Approved
j'bang 0.36.1 168 Sunday, August 2, 2020 Approved
j'bang 0.36.0 122 Saturday, August 1, 2020 Approved
j'bang 0.35.1 135 Friday, July 31, 2020 Approved
j'bang 0.35.0 129 Friday, July 31, 2020 Approved
j'bang 0.34.1 123 Tuesday, July 28, 2020 Approved
j'bang 0.34.0 154 Sunday, July 26, 2020 Approved
j'bang 0.33.0 147 Tuesday, July 7, 2020 Approved
j'bang 0.32.0 161 Saturday, June 20, 2020 Approved
j'bang 0.31.0 141 Sunday, June 14, 2020 Approved
j'bang 0.30.0 138 Friday, June 12, 2020 Approved
j'bang 0.29.1 138 Saturday, June 6, 2020 Approved
j'bang 0.29.0 141 Saturday, June 6, 2020 Approved
j'bang 0.28.0 128 Thursday, June 4, 2020 Approved
j'bang 0.27.0 154 Monday, June 1, 2020 Approved
j'bang 0.26.0 146 Sunday, May 31, 2020 Approved
j'bang 0.25.0 126 Thursday, May 28, 2020 Approved
j'bang 0.24.0 131 Thursday, May 21, 2020 Approved
j'bang 0.23.0 129 Saturday, May 16, 2020 Approved
j'bang 0.22.0.2 173 Thursday, April 16, 2020 Approved
j'bang 0.21.0 149 Friday, April 10, 2020 Approved
j'bang 0.20.0 176 Sunday, March 22, 2020 Approved
j'bang 0.19.0 179 Thursday, March 5, 2020 Approved
j'bang 0.18.0 150 Saturday, February 29, 2020 Approved
j'bang 0.17.0 165 Monday, February 24, 2020 Approved
j'bang 0.16.2 180 Saturday, February 22, 2020 Approved
j'bang 0.16.1 162 Sunday, February 16, 2020 Approved
j'bang 0.16.0 170 Saturday, February 15, 2020 Approved
j'bang 0.15.1 172 Saturday, February 15, 2020 Approved
j'bang 0.15.0 136 Thursday, February 13, 2020 Approved
j'bang 0.14.2 181 Sunday, February 9, 2020 Approved
j'bang 0.14.1 151 Saturday, February 8, 2020 Approved
j'bang 0.14.0 175 Tuesday, February 4, 2020 Approved
j'bang 0.13.2 144 Wednesday, January 29, 2020 Approved
j'bang 0.13.1 153 Wednesday, January 29, 2020 Approved
j'bang 0.13.0 201 Wednesday, January 29, 2020 Approved
jbang 0.12.2 126 Saturday, January 25, 2020 Approved
jbang 0.12.1 162 Saturday, January 25, 2020 Approved
jbang 0.11.1 125 Wednesday, January 22, 2020 Approved
jbang 0.11.0 132 Wednesday, January 22, 2020 Approved
jbang 0.6.0.5 141 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