Skip to content

Conversation

amankumar100
Copy link

@amankumar100 amankumar100 commented Jul 9, 2025

No description provided.

The export logic in JavaBuild.java previously looked only for JDK folders starting with "jdk-".
However, the embedded JDK may simply be named "jdk", causing path resolution to fail and no JRE to be bundled.
This leads to macOS launch issues like JRExLoadFullError and JRELoadError.
Updated the filter to also allow "jdk" prefixes.
@SableRaf
Copy link
Collaborator

SableRaf commented Jul 9, 2025

Summary

Fixes #1141: macOS exported apps fail with JRExLoadFullError or JRELoadError.

Cause : The export logic in JavaBuild.java was only checking for directories that start with jdk-, but the embedded JDK can be named just jdk. This caused the bundling step to fail, resulting in missing JREs.

Fix : Replaced the strict .startsWith("jdk-") check with .startsWith("jdk"), allowing both jdk and jdk- prefixed folders.

Impact :

Ensures macOS exported apps bundle the JRE properly
Prevents runtime errors on macOS after export

Thanks for submitting this patch, and welcome!

Just a heads-up: we ask that contributors get assigned to an issue before opening a PR. In this case, someone else is already assigned to the issue.

I appreciate the effort you put into this. Since it's a small change, we're happy to review it and share feedback. However, we won't be merging this PR.

@SableRaf SableRaf requested a review from Stefterv July 9, 2025 12:56
@Stefterv
Copy link
Collaborator

Stefterv commented Jul 9, 2025

Just tested it on macOS (arm) and removing the dash is not enough to fix the issue
Screenshot 2025-07-09 at 15 11 54

@SableRaf
Copy link
Collaborator

SableRaf commented Jul 9, 2025

Thanks for your interest in contributing @amankumar100. Just a reminder: if an issue is already assigned, it means someone is already working on it. You're still very welcome to join the conversation on the issue itself and offer solutions, that kind of input is also valuable.

If you'd like to contribute code, please start with an unassigned issue. Before you do, make sure to build locally and test your changes. See BUILD.md for instructions.

@amankumar100 amankumar100 deleted the fix-1141 branch July 10, 2025 10:24
@amankumar100 amankumar100 restored the fix-1141 branch July 15, 2025 09:10
@amankumar100 amankumar100 deleted the fix-1141 branch July 15, 2025 09:13
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.

3 participants