[ 
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.

  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 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 message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to