You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Robbie Cahill (JIRA)" <ji...@apache.org> on 2016/09/28 13:39:20 UTC

[jira] [Updated] (CB-11925) OpenJDK 9 version string not detected by regex in check_java

     [ https://issues.apache.org/jira/browse/CB-11925?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robbie Cahill updated CB-11925:
-------------------------------
    Description: 
Running OpenJDK 9 on Ubuntu, javac -version returns

{code}
javac 9-internal
{code}

Down the bottom of check_java in check_reqs.js you have the following (comments added to illustrate the problem):
{code}
        }).then(function (output) {
            console.log(output); //returns javac 9-internal
            console.log(/javac ((?:\d+\.)+(?:\d+))/i.exec(output)); //returns null
            var match = /javac ((?:\d+\.)+(?:\d+))/i.exec(output)[1]; //Error: Cannot read property '1' of null
            return match && match[1];
        });
{code}

It looks like the regex fails to match the string, which breaks cordova build / run.

This is using the latest cordova 6.3.1

  was:
Running OpenJDK 9 on Ubuntu, javac -version returns

{code}
javac 9-internal
{code}

Down the bottom of check_java in check_reqs.js you have the following (comments added to illustrate the problem):
{code}
        }).then(function (output) {
            console.log(output); //returns javac 9-internal
            console.log(/javac ((?:\d+\.)+(?:\d+))/i.exec(output)); //returns null
            var match = /javac ((?:\d+\.)+(?:\d+))/i.exec(output)[1]; //Error: Cannot read property '1' of null
            return match && match[1];
        });
{code}

It looks like the regex fails to match the string, which breaks cordova build / run.


> OpenJDK 9 version string not detected by regex in check_java
> ------------------------------------------------------------
>
>                 Key: CB-11925
>                 URL: https://issues.apache.org/jira/browse/CB-11925
>             Project: Apache Cordova
>          Issue Type: Bug
>            Reporter: Robbie Cahill
>
> Running OpenJDK 9 on Ubuntu, javac -version returns
> {code}
> javac 9-internal
> {code}
> Down the bottom of check_java in check_reqs.js you have the following (comments added to illustrate the problem):
> {code}
>         }).then(function (output) {
>             console.log(output); //returns javac 9-internal
>             console.log(/javac ((?:\d+\.)+(?:\d+))/i.exec(output)); //returns null
>             var match = /javac ((?:\d+\.)+(?:\d+))/i.exec(output)[1]; //Error: Cannot read property '1' of null
>             return match && match[1];
>         });
> {code}
> It looks like the regex fails to match the string, which breaks cordova build / run.
> This is using the latest cordova 6.3.1



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org