Skip to content

Java version detection improvements#8753

Merged
headius merged 9 commits intojruby:masterfrom
headius:minimum_java_for_launcher
Apr 8, 2025
Merged

Java version detection improvements#8753
headius merged 9 commits intojruby:masterfrom
headius:minimum_java_for_launcher

Conversation

@headius
Copy link
Member

@headius headius commented Apr 8, 2025

We want to be able to use this script with older versions of JRuby that will have different minimum Java versions, so use a new file bin/.java-version as the minimum.

Once this is approved we should be able to backport the script to JRuby 9.4 and know that it won't cause problems if it is copied or backported manually to versions older than that.

We want to be able to use this script with older versions of JRuby
that will have different minimum Java versions, so use a new file
bin/.java-version as the minimum.
@headius headius added this to the JRuby 10.0.0.0 milestone Apr 8, 2025
@headius headius requested a review from mrnoname1000 April 8, 2025 05:23
headius added 4 commits April 8, 2025 00:29
Many Java 1.8 builds do not include a `release` file, and other
post-1.8 JDKs may not include the file (though we have not found
any recently). Since the release file started to show up around
Java 9 timeframe, this change assumes if it is not present, we
are probably on Java 8. This is the second change necessary to
make the new launcher script work on older JRuby versions that
still support Java 8.
@headius headius changed the title Allow using same script with different minimum Java Java version detection improvements Apr 8, 2025
@headius
Copy link
Member Author

headius commented Apr 8, 2025

A few additional tweaks:

  • Check for existence of $JAVA_HOME/release file.
  • Detect "1.8" and treat it as "8".

@headius
Copy link
Member Author

headius commented Apr 8, 2025

This is being tested with 9.4 in #8754 and is green with the latest set of changes.

@headius headius force-pushed the minimum_java_for_launcher branch from 0595969 to 3d6e75c Compare April 8, 2025 21:56
@mrnoname1000
Copy link
Contributor

LGTM

@headius headius merged commit 55a0013 into jruby:master Apr 8, 2025
70 of 71 checks passed
@headius headius deleted the minimum_java_for_launcher branch April 8, 2025 22:11
headius added a commit to jruby/jruby-launcher that referenced this pull request Apr 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants