-
Notifications
You must be signed in to change notification settings - Fork 5
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
Look for javac
instead of java
#184
base: develop
Are you sure you want to change the base?
Conversation
There are some situations where using `bin/java` as a heuristic to find JAVA_HOME within a JDK package can result in mistakenly finding a JRE root instead. Looking for `bin/javac` fixes this since JREs do not have `javac`. This should fix palantir#97
Thanks for your interest in palantir/gradle-jdks, @arlaneenalra! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request. |
Generate changelog in
|
Note: I'll sign the CLA .. but the rest of those items seem a bit much .. |
Bump: What is needed to get this reviewed? |
My error is different from the summary's linked issue #97, but I think this PR would fix the wrong selection of the JRE rather than the JDK when I'm running into with Java 8:
@arlaneenalra: It looks like you have to press two checkmark boxes ("Type: Fix" and "Check the box to generate changelog(s)"). Is that possible? |
Maybe .. I have no idea how that changelog-app thing works and can't find the documentation in my cursory glance online .. I'll take a crack at adding what I think might be the correct file ... |
There are some situations where using
bin/java
as a heuristic to find JAVA_HOME within a JDK package can result in mistakenly finding a JRE root instead. Looking forbin/javac
fixes this since JREs do not havejavac
.This should fix #97
Before this PR
The
findJavaHome
method could mistakenly find a JRE inside of the JDK packages instead of the JDK resulting in an unusable JAVA_HOME. This main impacted some older JDKs.After this PR
==COMMIT_MSG==
Use
bin/javac
to find JAVA_HOME instead ofbin/java
to avoid accidentally installing a JRE instead of a JDK.==COMMIT_MSG==
Possible downsides?