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

/usr/libexec/java_home call wrong for new version scheme #55

Open
Vampire opened this issue Aug 7, 2019 · 2 comments · May be fixed by #88
Open

/usr/libexec/java_home call wrong for new version scheme #55

Vampire opened this issue Aug 7, 2019 · 2 comments · May be fixed by #88

Comments

@Vampire
Copy link
Contributor

Vampire commented Aug 7, 2019

/usr/libexec/java_home is always called with 1.<version>+ but that is wrong.
With Java 8 and Java 11 installed.
If you call /usr/libexec/java_home -v 1.11 it tells you "Unable to find any JVMs matching version 1.11", but nevertheless returns the latest installed version 11.
If you call /usr/libexec/java_home -v 11 it properly returns the latest installed version 11.

There is no too big problem, as with 1.12+ it considers 11 newer than 1.12 and returns it, with 12+ it complains that no JVM is found and returns the latest installed version 11 which is then ruled out by the manual major version comparison. It might just be cleaner to call the tool properly.

@Vampire
Copy link
Contributor Author

Vampire commented Aug 7, 2019

Maybe it would make sense to add the argument -F that will not return the default JVM if the query couldn't be fulfilled.

@FranklinYu
Copy link
Contributor

Is it the function findJDKDylib? How about prepending 1. only when version is lower than 10?

Vampire added a commit to Vampire/appbundler that referenced this issue Nov 20, 2023
@Vampire Vampire linked a pull request Nov 20, 2023 that will close this issue
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 a pull request may close this issue.

2 participants