Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

[Feature Request]: Use the launcher-provided Java when needed #37

Closed
1 task done
osfanbuff63 opened this issue Nov 9, 2022 · 3 comments
Closed
1 task done
Assignees
Labels
enhancement New feature or request important High priority issues
Milestone

Comments

@osfanbuff63
Copy link
Member

Code of Conduct

  • I agree to follow this project's Code of Conduct

Potential Enhancement

Not everyone using the vanilla launcher will have a JDK installed. The launcher provides the Microsoft OpenJDK build to the launcher, so we should utilize this if needed.

How it could be implemented

This can be piped into the get_java() function.

On 64-bit Windows, the Java executable is usually at C:\Program Files (x86)\Minecraft Launcher\runtime\java-runtime-gamma\windows-x64\java-runtime-{version}\bin\javaw.exe. For {version}: java-runtime-alpha is Java 16, java-runtime-beta is 17.0.1 and java-runtime-gamma is 17.0.3. java-legacy is Java 8.

On 32-bit Windows, same as 64-bit but it's C:/Program Files instead of Program Files (x86).

I'm not sure where it's stored on macOS or Linux.

Anything else?

No response

@osfanbuff63 osfanbuff63 added enhancement New feature or request important High priority issues labels Nov 9, 2022
@osfanbuff63 osfanbuff63 added this to the Full Release milestone Nov 9, 2022
@nsde
Copy link
Contributor

nsde commented Nov 12, 2022

That all needed libraries are installed is really important, of course.

Any MacOS testers? 🤔

@osfanbuff63
Copy link
Member Author

osfanbuff63 commented Nov 14, 2022

Alright, this should have been implemented in #37. Of course, I can't test it as my Adoptium JDK would be found by the script ($JAVA_HOME) and I don't really want to go unset those variables lol. Would appreciate some testers ❤️

32-bit Windows isn't supported, as the current sys.platform implementation doesn't support detecting the architecture, according to the docs. The platform module can detect the architecture, however Steam's hardware survey doesn't even list it under OS. On the macOS side, as long as the launcher downloads an arm64 JRE and that doesn't fall under a different path (which I doubt), it won't be a problem with new Apple Silicon. If it ends up being one, I will implement a system for that - because I've seen a good number of people showing off or asking for help in the FO discord on an M1 or M2-based chip.

Until we get some testing, I'm not going to close this issue because I can't be sure if it works or not.


That all needed libraries are installed is really important, of course.

After all, any imported modules would just throw an error if they weren't found. pip should download them, binaries include them, scripts would install them - so I wouldn't think this is much of a concern.

@osfanbuff63 osfanbuff63 self-assigned this Nov 23, 2022
@osfanbuff63
Copy link
Member Author

Since I haven't seen anything, going to close this issue. We can open a new issue if the implementation is bugged.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request important High priority issues
Projects
None yet
Development

No branches or pull requests

2 participants