Skip to content

v0.108.0

Compare
Choose a tag to compare
@maxandersen maxandersen released this 10 Jun 11:16
· 148 commits to main since this release

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

  • 9c2255b feat: JEP 445: Unnamed Classes and Instance Main Methods (#1633)

🐛 Fixes

  • ac432ec fix: detect version from JAVA_RUNTIME_VERSION and don't use JAVA_VERS… (#1632)

  • 62d3d7b [minor] java 21 JEP445 support

Contributors

We'd like to thank the following people for their contributions:
GitHub, Max Rydahl Andersen