From 47abde2f8d98df6a8c4ae547398c74ca8bd56e0a Mon Sep 17 00:00:00 2001 From: Joe Bowser Date: Mon, 19 Sep 2016 13:35:16 -0700 Subject: [PATCH] CB-11640: Changing requirements check to ask for Java 8 --- bin/lib/check_reqs.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/lib/check_reqs.js b/bin/lib/check_reqs.js index f27f325b..7790b226 100644 --- a/bin/lib/check_reqs.js +++ b/bin/lib/check_reqs.js @@ -152,7 +152,9 @@ module.exports.check_java = function() { // javac writes version info to stderr instead of stdout return tryCommand('javac -version', msg, true) .then(function (output) { - var match = /javac ((?:\d+\.)+(?:\d+))/i.exec(output); + console.log(output); + //Let's check for at least Java 8, and keep it future proof so we can support Java 10 + var match = /javac ((?:1\.)(?:[8-9]\.)(?:\d+))|((?:1\.)(?:[1-9]\d+\.))(?:\d+)/i.exec(output); return match && match[1]; }); });