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

Unable to select Java in Minecraft 1.21 (Tested on Mac computers with Apple Slicon) #9

Closed
Uni0305 opened this issue Jul 23, 2024 · 8 comments

Comments

@Uni0305
Copy link

Uni0305 commented Jul 23, 2024

In macos environment, when using java 17 for Minecraft 1.20.1, java is detected normally, but when trying to use java 21 for Minecraft 1.21, the error "Invalid Selection" is output and there is a problem that cannot be executed.

Minecraft 1.21 with Java 21
Minecraft 1.20.1 with Java 17

I think there was an update from helios-core in this regard, but it still seems to be an issue.
#7

I used the launcher source in almost the same state as the original (modifying distribution url only. last commit: eb683f8), and my distribution.json file is as attached below. (Note: The actual URL was replaced by localhost for security)
distribution.json

@Uni0305
Copy link
Author

Uni0305 commented Aug 4, 2024

This same issue also exists in Minecraft 1.12.2 with the Forge mod loader installed, which requires Java 8.
However, this issue seems to work normally in the Windows environment, so please check if there is a problem. (Minecraft 1.21, which requires Java 21, still has issues in the Windows environment)

@dscalzi
Copy link
Owner

dscalzi commented Aug 5, 2024

@dscalzi
Copy link
Owner

dscalzi commented Aug 5, 2024

You can configure different rules if you need to https://github.com/dscalzi/HeliosLauncher/blob/master/docs/distro.md#javaoptions-object

@dscalzi
Copy link
Owner

dscalzi commented Aug 5, 2024

Appears to be an issue with the semver function 2e37936#diff-2de96283ccb9afe0df455134caa33d845a0f5181a4ff12783a48f869552a96adR52

Will stop using that

@dscalzi
Copy link
Owner

dscalzi commented Aug 5, 2024

i'll push out a new version in a few days

@dscalzi
Copy link
Owner

dscalzi commented Aug 5, 2024

Until that is pushed, you should be able to work around this by just including the following in your severmeta.json in Nebula for your 1.21 server.

{
  "meta": {
    "javaOptions": {
      "supported": ">=21",
      "suggestedMajor": 21
    }
  }
}

dscalzi added a commit that referenced this issue Aug 5, 2024
@wolfun2001
Copy link

semver.satisfies is also used in JavaGuard, and I think it may not work correctly in certain situations. For example, when my intention is >=8, if I select version 11 of Java, it will return false.

@dscalzi
Copy link
Owner

dscalzi commented Oct 22, 2024

Is this still an issue?

@dscalzi dscalzi closed this as completed Nov 29, 2024
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

No branches or pull requests

3 participants