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
Bot releases are visible (Hide)
Published by github-actions[bot] about 4 years ago
Published by github-actions[bot] about 4 years ago
--debug
now allow specify host part to allow remote debugging, i.e. --debug *:5005
Published by github-actions[bot] about 4 years ago
Published by github-actions[bot] about 4 years ago
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%
Published by github-actions[bot] about 4 years ago
Minor fix release that documents use of stdin and fix docker publishing.
Published by github-actions[bot] about 4 years ago
This changes (almost) everything!
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 AdoptOpenJDKPreviously 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!
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.
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
.
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
Published by github-actions[bot] over 4 years ago
This changes everything :)
jbang init
instead of jbang --init
.jbang file.java
still "just works" but is now in reality execution of jbang run file.java
.jbang echo.java '*'
where * are quoted no longer does expansion. A bugfix but does break existing scripts if they relied on this.dk.xam.*
references to dev.jbang
to match https://jbang.dev.Published by github-actions[bot] over 4 years ago
--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.
Published by github-actions[bot] over 4 years ago
jbang https://bit.ly/jbangrickroll
jbang --alias rr https://bit.ly/jbangrickroll
and from then on jbang rr
will call that url.~/.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.Published by github-actions[bot] over 4 years ago
jbang --cds ...
and jbang will build and run with CDS enabled.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.
Published by github-actions[bot] over 4 years ago
Bugfix: entrypoint for docker fixed.
Published by github-actions[bot] over 4 years ago
Bug fixes:
%JAVA_HOME%
if set when it runs jbang
Published by github-actions[bot] over 4 years ago
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
Published by github-actions[bot] over 4 years ago
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.Published by github-actions[bot] over 4 years ago
--interactive
to stay in the REPL/interactive mode.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.Published by github-actions[bot] over 4 years ago
Published by github-actions[bot] over 4 years ago
jbang <gist github url>
now uses github rest api to run the first java file found in the list of files.jbang https://gist.github.com/maxandersen/590b8a0e824faeb3ee7ddfad741ce842
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/
Published by github-actions[bot] over 4 years ago
jbang --native helloworld.java
.Published by github-actions[bot] over 4 years ago
//DEPS
.//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.Published by github-actions[bot] over 4 years ago
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.