@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
- 427fb31 added support for modules (#1567)
- 0e8fe6d added support for remote-file arguments (#1577)
- d52e090 set Java 17 as the default for new installations (#1583)
🐛 Fixes
- 2dd639d Fixed NPE dealing with jdk providers (#1586)
- 5398043 Symbolic link permission issues on Windows (#1575)
- 418614c all default values can be set by config (#1578)
- ef74350 fixed issue with PowerShell quoting
- b1b0b08
jdk list --availablenow takes into account os/arch (#1573) - f467fa4
info toolsnow downloads JDKs again (#1571)
- 7cce78e [minor]
- 1836382 add davsclaus as a contributor for code (#1581)
- 483883e Upgrade (c) from 2022 to 2023 (#1580)
- b96e296 add docs for reason on camelcase vs noncase
Contributors
We'd like to thank the following people for their contributions:
Claus Ibsen, Tako Schotanus, Max Rydahl Andersen, GitHub, allcontributors[bot]