Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Detecting module support based on the existence of the jmods directory was fragile for at least two reasons: * The jmods directory is only present in some builds of the JDK (not JRE) that can be used to jlink new runtime environments. * Some distributions of the JDK may omit or relocate this directory, such as Nix's version (jruby#6608). Instead we detect modules using two other mechanisms that should reliably work on all modularized Java runtimes: * Check for JAVA_HOME/lib/modules, generated by the jlink process. * Check for a JAVA_HOME/release file with a MODULES entry. See https://stackoverflow.com/questions/66601929 for a summary of detection mechanism. Fixes jruby#6608. jruby-launcher will need a matching update.
- Loading branch information