v0.108.0
Changelog
Recently support for main methods without a surrounding class was merged into OpenJDK main line.
This release now supports that feature.
At time of writing the default Termurin JDK builds does not have the latest build thus
for now you will have to manually build the JDK and set that up in your path.
Also since it is a Java preview feature you will need to use --enable-preview
or put //PREVIEW
in the file.
That means the smallest self-contained Java 21 example looks as follows:
//PREVIEW
//JAVA 21+
void main() {
System.out.println("Hello World");
}
And can now be run using jbang main.java
if you have Java 21 latest nightly build installed.
If you prefer
🚀 Features
🐛 Fixes
- 62d3d7b [minor] java 21 JEP445 support
Contributors
We'd like to thank the following people for their contributions:
GitHub, Max Rydahl Andersen