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

Include Recommended-Version in the jar manifest #638

Open
TrixterTheTux opened this issue May 13, 2021 · 0 comments
Open

Include Recommended-Version in the jar manifest #638

TrixterTheTux opened this issue May 13, 2021 · 0 comments

Comments

@TrixterTheTux
Copy link

Is your feature request related to a problem?

With the newest minecraft versions moving towards more newer java versions, it is rather hard to allow users to switch between multiple different jars without impacting user experience due to possibly running the wrong java version. This issue aims to solve this problem (in the future releases) by allowing indicating the recommended version for automated tools (e.g. game panels automatically choosing the wanted version) to avoid having to run the minimum version of java.

Describe the solution you'd like.

The jar's manifest file (meta-inf/manifest.mf) could include the field Recommended-Version which would contain the major version number of the recommended java version for the jar. This allows any automated tool to check if it's present and automatically choose the recommended java version over having to rely on either the user choosing the correct version or using the minimum required version included in the java classes bytecode (leading to possible warning messages in console).

Describe alternatives you've considered.

You can parse the target java version from the java classes bytecode (https://en.wikipedia.org/wiki/Java_class_file#General_layout), but this only provides the minimum required version. Alternatively, you'd need to manually maintain a list of which minecraft versions should use which java version.

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

1 participant