github jbangdev/jbang v0.104.0

latest releases: v0.132.1, v0.132.0, v0.131.0...
2 years ago

@quintesse been on fire and added some long-time coming improvements! Java 17, module support and magic file replacement.

Default to Java 17, still work with Java 8+

JBang will now default to install Java 17 if no other Java is available. Mainly done since Java 13+ has features that makes symbolic
links work by default better on Windows; but also just that Java 17 is a better default to use for Java code these days. Note: JBang will continue to work with Java 8+ to ensure JBang is available on as many platforms as possible.

(Experimental) Support for Java Modules

You can now add a //MODULE line to your java sources and JBang will build and run it as a Java Module. Any //DEPS gets converted to a requires module and the module path rather than classpath is used for dependencies.

Try it out and tell if it works for your Java Module usecases.

Magical remote file expansion

JBang will now download remote files on the command line and replace them with file references. i.e. '%https://some.url/a.txt' or '%{https://some.url/a.txt}'.

This allows you utilize jbang's file download/caching mechanism to enhance scripts that deal with local files to handle remote urls:

jbang wordcount %https://github.com/dwyl/english-words/raw/master/words.txt

Similarly we've added this support to --javaagent too allowing you do things like:

jbang --verbose --javaagent=byteman@maxandersen=boot:$(jbang info classpath byteman@maxandersen),script:%{https://raw.githubusercontent.com/bytemanproject/byteman/main/sample/scripts/FileMonitor.btm} env@jbangdev

Which fetches the byteman agent using the alias byteman@maxandersen and fetches remotely the FileMonitor.btm file to inject its instructions.

Enabling to use and run agents without having to install any java or agent scripts - all without having to change byteman.

Changelog

🚀 Features

🐛 Fixes


Contributors

We'd like to thank the following people for their contributions:
Claus Ibsen, Tako Schotanus, Max Rydahl Andersen, GitHub, allcontributors[bot]

Don't miss a new jbang release

NewReleases is sending notifications on new releases.