Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On MacOS, do not assume existence of Contents/Home in the JDK binary path #9684

Merged
merged 6 commits into from
Apr 15, 2024

Conversation

GregoryTravis
Copy link
Contributor

Currently when looking for the java executable on MacOS, we assume that it's under $root/Contents/Home/bin. On my M1 (running Monterey 12.6.3), using sdkman, there is no Contents/Home between $root and bin.

This change checks for the binary under Contents/Home/bin, and if it doesn't exist, defaults back to just bin.

I suspect that this depends on the OS version.

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • All code has been tested:
    • Unit tests have been written where possible.
    • If GUI codebase was changed, the GUI was tested when built using ./run ide build.

Copy link
Member

@JaroslavTulach JaroslavTulach left a comment

Choose a reason for hiding this comment

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

Checking both locations shall not break anything.

I suspect that this depends on the OS version.

I suspect that it is the sdkman behavior.

@GregoryTravis GregoryTravis marked this pull request as ready for review April 15, 2024 20:06
@GregoryTravis GregoryTravis added CI: No changelog needed Do not require a changelog entry for this PR. CI: Ready to merge This PR is eligible for automatic merge labels Apr 15, 2024
@mergify mergify bot merged commit 271a744 into develop Apr 15, 2024
37 of 38 checks passed
@mergify mergify bot deleted the wip/gmt/fix-mac-java-path branch April 15, 2024 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: No changelog needed Do not require a changelog entry for this PR. CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants