Skip to content

Launcher: Defensive fixes#8730

Merged
headius merged 6 commits into
jruby:masterfrom
mrnoname1000:launcher-defense
Sep 2, 2025
Merged

Launcher: Defensive fixes#8730
headius merged 6 commits into
jruby:masterfrom
mrnoname1000:launcher-defense

Conversation

@mrnoname1000

@mrnoname1000 mrnoname1000 commented Mar 31, 2025

Copy link
Copy Markdown
Contributor

Added some checks to the launcher to handle missing HOME, JAVA_HOME, or argument to -{C,e,I,S}

Fixes #8747

@mrnoname1000
mrnoname1000 requested a review from headius March 31, 2025 03:16

@headius headius left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to detect whether we found a JAVA_HOME a different way that works without the release file; perhaps $JAVA_HOME/bin/java?

Comment thread bin/jruby.sh Outdated
@mrnoname1000

Copy link
Copy Markdown
Contributor Author

Added some code to parse $JAVA_HOME/release instead of source it, which lets us use $JAVA_RELEASE_VERSION for the AppCDS archive which may be more correct and will handle Graal better

@mrnoname1000

Copy link
Copy Markdown
Contributor Author

I think we need to detect whether we found a JAVA_HOME a different way that works without the release file; perhaps $JAVA_HOME/bin/java?

The problem with this is we find JAVA_HOME by trimming /bin/java from the path to java, if we add that back on it will always match

@headius

headius commented Sep 2, 2025

Copy link
Copy Markdown
Member

@mrnoname1000 Please re-review this... it's been sitting for a few months and I want to make sure it's still valid.

@mrnoname1000

Copy link
Copy Markdown
Contributor Author

Weirdly enough the last commit to the launcher in master was less than an hour before the first one in this branch, so no conflicts and everything still looks valid

@headius
headius merged commit dba2916 into jruby:master Sep 2, 2025
@headius

headius commented Sep 2, 2025

Copy link
Copy Markdown
Member

@mrnoname1000 Thanks, merged!

@headius headius added this to the JRuby 10.0.3.0 milestone Sep 2, 2025
headius added a commit to headius/jruby that referenced this pull request Sep 2, 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.

Launcher script chokes on GraalVM release file

2 participants