jbang

Unleash the power of Java - JBang Lets Students, Educators and Professional Developers create, edit and run self-contained source-only Java programs with unprecedented ease.

MIT License

Stars
1.3K
Committers
91

Bot releases are visible (Hide)

jbang - v0.36.1

Published by github-actions[bot] about 4 years ago

News

  • Another bug fix for the git hub action container. This time is it!
jbang - v0.36.0

Published by github-actions[bot] about 4 years ago

News

  • New feature --debug now allow specify host part to allow remote debugging, i.e. --debug *:5005
  • github action / docker image more consistent with argument handling
jbang - v0.35.1

Published by github-actions[bot] about 4 years ago

News

  • Fix issue with docker image where mkdir did not work.
jbang - v0.35.0

Published by github-actions[bot] about 4 years ago

News

  • When running untrusted sources jbang now asks user if he wants to run it once, trust or abort. Seems like the best compromise between security and user convenience.

  • bug fixed so //DEPS org.log4j:log4j:${log4j.version:2.1.14} is now possible; allowing jbang -Dlog4j.version=3.0.0 hello.java to override used dependencies.

  • arch64 added to supported java boostrapping of jbang

  • jbang cache clear now supports cleaning up projects, scripts and stdin

  • improved startup performance with ~17%

jbang - v0.34.1

Published by github-actions[bot] about 4 years ago

News

Minor fix release that documents use of stdin and fix docker publishing.

jbang - v0.34.0

Published by github-actions[bot] about 4 years ago

News

This changes (almost) everything!

No Java ? No problem!

With great help from @quintesse jbang will now download Java 11 if no java is available; making it possible to run java scripts on any machine without any setup. This is huge! Basically no easier way to get started using Java than via jbang (if you know of something easier I would love to hear what we can improve :)

//JAVA <version> for auto-download of matching Java runtimes from AdoptOpenJDK

Previously you had to always have the right version of java installed to run your jbang script - you can still do it but we find it quite tedious!

Now you can specify in a script using //JAVA 11+ to indicate you want to run with a JDK version 11 or higher. If one is available jbang will use it; but if not it will download the right adoptopenjdk JDK for your platform!

You can specify any kind of major java version as long as it is available from AdoptOpenJDK!

Aliases

You can now use jbang alias to add, remove and list aliases to allow you to hide full path / url details of the script. Nice for you own scripts.

Implicit Script Catalogs

jbang is all about making it easy to run Java based scripts; with JDK auto download and aliases it opens up for an interesting feature: implicit script catalogs.

Seeing is believing, thus install jbang 0.34 and run this: jbang properties@jbangdev

This will run a script provided at https://github.com/jbangdev/jbang-catalog.

You can see which are available using jbang alias list jbangdev.

And of course you can provide this too on Github, GitLab and BitBucket; jbang will automatically look for jbang-catalog in your org/username.

If you want to call it something else then you can be explicit: jbang properties@maxandersen/weird-catalog.

Running Jar directly or via GAV's

Over time we noticed that we were writing jbang scripts that was just a wrapper of something available in Maven.
To skip having to write dumb wrapper scripts you can now run jars or GAV's like:

local jar:

jbang helloworld.jar

GAV:

jbang info.picocli:picocli-codegen:4.2.0

See more in the docs; but in short - big release that makes jbang and java much more easily available!

Enjoy and give a follow to https://twitter.com/jbangdev

jbang - v0.33.0

Published by github-actions[bot] over 4 years ago

News

This changes everything :)

Breaking changes:

  • Moved from flag based to command based execution. i.e. jbang init instead of jbang --init.
    jbang file.java still "just works" but is now in reality execution of jbang run file.java.
    Will print info/error if usiing old flag and tell you what to use instead.
  • Exit codes are now honoured. Was always meant to be that way but lack of testing let it slip through.
    Thus if you have code that cause errors it will now be detected as a failed run where before it would have been success.
  • Quoting should now be more consistent on both linux/osx and windows. i.e. jbang echo.java '*' where * are quoted no longer does expansion. A bugfix but does break existing scripts if they relied on this.

Fixes:

  • refactored all dk.xam.* references to dev.jbang to match https://jbang.dev.
  • Moved integration test to https://github.com/intuit/karate allowing to have portable CLI testing
  • Fixed issues in shell script and batch script that the testing revealed.
  • quoting should now be more consistent on both linux/osx and windows.
  • Aliases can now have a description
  • Fixes contributed
jbang - v0.32.0

Published by github-actions[bot] over 4 years ago

New features

--edit-live=gitpod will now when run on gitpod.io print out a url to a workspace that will have the project configured. See https://github.com/jbangdev/jbang-examples for examples.

jbang - v0.31.0

Published by github-actions[bot] over 4 years ago

News

New Features

  • Redirection now honours url rewriting thus url shorternes work, i.e. jbang https://bit.ly/jbangrickroll
  • alias support by @quintesse, lets you do jbang --alias rr https://bit.ly/jbangrickroll and from then on jbang rr will call that url.
  • In past ~/.jbang/ was used as a cache, now its default is ~/.jbang/cache making so jbang --clear-cache does not make you loose your alias and trust config.
jbang - v0.30.0

Published by github-actions[bot] over 4 years ago

News

Features

  • Experimental Class Data Sharing support (require Java 13+)
    You can now run jbang --cds ... and jbang will build and run with CDS enabled.
    Gives a speedup boost - especially if using external dependencies.

Bug fixes

  • jbang script on Windows (when not installed via choco) using cygwin and mingw(git bash)
    failed. It now falls back to jbang.bat making it work no matter where and how it is called (hopefully :)

  • vscode integration will not rewrite settings.json during --live-edit to allow change settings. They will be regenerated though.

jbang - v0.29.1

Published by github-actions[bot] over 4 years ago

News

Bugfix: entrypoint for docker fixed.

jbang - v0.29.0

Published by github-actions[bot] over 4 years ago

News

Bug fixes:

  • docker/github action now run as non-root user when needed (i..e. in openshift) (thanks @kameshsampath !)
  • Windows now honors %JAVA_HOME% if set when it runs jbang
  • Fixed container builds which was not pushing to new jbangdev destinations
jbang - v0.28.0

Published by github-actions[bot] over 4 years ago

News

  • echo 'System.out.println("hello")' | jbang - now works; using - as argument and jbang will interpret whatever is on stdin as a jshell script.

  • Twitter support is back. jbang https://twitter.com/maxandersen/status/1266329490927616001 works again after twitter disabled their open web friendly site and forced closed web on everyone; luckily mobile.twitter.com still exist and now

jbang - v0.27.0

Published by github-actions[bot] over 4 years ago

News

New Features

  • Trusted sources - jbang will no longer just run urls from unknown sources. i.e. on first run of jbang https://twitter.com/maxandersen/status/1266904846239752192 twitter! jbang will print out url is not trusted and print out examples on how to call jbang --trust=<source> to get it trusted.
jbang - v0.26.0

Published by github-actions[bot] over 4 years ago

News

Behaviour change

  • jshell now exits by default making jshell and java runs behave the same. Use new flag --interactive to stay in the REPL/interactive mode.

New Features

  • Supports running twitter and carbon.now.sh urls. i.e. jbang https://twitter.com/maxandersen/status/1266904846239752192. This will extract text/source code from url html content using og:description meta header. If static main detected run as java otherwise as a jshell script.
  • Running url Gists without a username now works

Bug fixes

  • Various vscode project generation improvements by @fbricon
  • doc fixes by @manikmagar
jbang - v0.25.0

Published by github-actions[bot] over 4 years ago

News

  • no feature changes, just move to use jbangdev/ instead of maxandersen/ orgs where possible.
jbang - v0.24.0

Published by github-actions[bot] over 4 years ago

News

New features:

  • jbang <gist github url> now uses github rest api to run the first java file found in the list of files.
    for example: jbang https://gist.github.com/maxandersen/590b8a0e824faeb3ee7ddfad741ce842
  • New Feature: jbossorg and redhat can now be used as repos shorthands. i.e. //REPOS jbossorg will automatically add https://repository.jboss.org/nexus/content/groups/public/ and //REPOS redhat will add https://maven.repository.redhat.com/ga/

Bug fixes:

  • No more duplicate classpath entries (Thanks to @jmini)
  • Minor bug fix around jitpack repos (Thanks to @jmini)
jbang - v0.23.0

Published by github-actions[bot] over 4 years ago

News

  • Very Experimental support for native-image: jbang --native helloworld.java.
  • Bug fix #85 to have symbolic links working better on Windows (thanks @dem2k)
jbang - v0.22.0.2

Published by github-actions[bot] over 4 years ago

News

  • can now use github, gitlab or bitbucket urls as part of //DEPS.
    i.e. //DEPS https://github.com/kohsuke/github-api. Supports using branches, tags or individual commits. Allows you to use libraries directly even without an actual published release.
  • shrinkwrap will no longer warn it could not download from a repository that is not the final repository.
jbang - v0.21.0

Published by github-actions[bot] over 4 years ago

News

  • Offline support - if you run jbang with -o or --offline dependency resolution will be in offline mode meaning if a dependency is not found locally the build will fail rather than try and go online and resolve it.
Package Rankings
Top 6.73% on Proxy.golang.org