Skip to content
Permalink
Browse files
fix: detect JAVA_HOME with Java 11 (#1406)
  • Loading branch information
ltm committed Mar 17, 2022
1 parent 6d3ce21 commit 112f0a61a855b39eba35841703f40a7244d0a395
Showing 1 changed file with 2 additions and 1 deletion.
@@ -99,7 +99,8 @@ const java = {
} else {
// See if we can derive it from javac's location.
var maybeJavaHome = path.dirname(path.dirname(javacPath));
if (fs.existsSync(path.join(maybeJavaHome, 'lib', 'tools.jar'))) {
if (fs.existsSync(path.join(maybeJavaHome, 'bin', 'java')) ||
fs.existsSync(path.join(maybeJavaHome, 'bin', 'java.exe'))) {
environment.JAVA_HOME = maybeJavaHome;
} else {
throw new CordovaError(default_java_error_msg);

0 comments on commit 112f0a6

Please sign in to comment.