Skip to content

why java version is got from stderr? #3148

@intellild

Description

@intellild

cli 3.2.1

I found this line of code

this.javaCompilerVerCache = output ? /javac (.*)/i.exec(output.stderr)[1] : null;

while stderr is empty and stdout is "Java 9\r\n", I tried changing "stderr" to "stdout" and it works with correct java version. Then in function 'validateJavacVersion', the 'installedJavaVersion' is receives a correct number '9'.

But this line of code return nothing

const matchingVersion = (installedJavaVersion || "").match(AndroidToolsInfo.VERSION_REGEX);

and endup with

Error executing command 'javac'. Make sure you have installed The Java Development Kit (JDK) and set JAVA_HOME environment variable.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions