fix: detect JAVA_HOME with Java 11#1406
Merged
breautek merged 1 commit intoapache:masterfrom Mar 17, 2022
ltm:fix-detect-java11
Merged
fix: detect JAVA_HOME with Java 11#1406breautek merged 1 commit intoapache:masterfrom ltm:fix-detect-java11
breautek merged 1 commit intoapache:masterfrom
ltm:fix-detect-java11
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1406 +/- ##
=======================================
Coverage 73.20% 73.20%
=======================================
Files 21 21
Lines 1646 1646
=======================================
Hits 1205 1205
Misses 441 441 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
breautek
approved these changes
Mar 16, 2022
Contributor
|
Looks good, thanks for the well documented PR and fix! |
wedgberto
pushed a commit
to wedgberto/cordova-android
that referenced
this pull request
May 17, 2022
ebhsgit
added a commit
to ebhsgit/cordova-android
that referenced
this pull request
May 25, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Platforms affected
Linux and Windows
Motivation and Context
Starting with Java 9 the JRE and JDK no longer include
tools.jaras described in JEP 220. As a result thecheck_javafunction is unable to detect a Java 11 installation unless theJAVA_HOMEenvironment variable is set manually:cordova-android/lib/env/java.js
Lines 101 to 102 in 6d3ce21
The check for
tools.jarappears to have been added in commit 7133576.Description
This change instead checks for the presence of
${maybeJavaHome}/bin/javaor${maybeJavaHome}/bin/java.exe. This is similar to the checks performed bygradlewandgradlew.bat.Testing
On Debian 11:
Checklist
(platform)if this change only applies to one platform (e.g.(android))