Skip to content

Find Java version from release file#922

Merged
testforstephen merged 1 commit intomicrosoft:masterfrom
testforstephen:javaVersion
Dec 16, 2020
Merged

Find Java version from release file#922
testforstephen merged 1 commit intomicrosoft:masterfrom
testforstephen:javaVersion

Conversation

@testforstephen
Copy link
Copy Markdown
Contributor

close #910

Finding Java version from release file is faster than resolving from "java -version" CLI.

Comment thread src/launchCommand.ts
* @param javaExec the path of the Java executable
*/
export async function getJavaVersion(javaExec: string): Promise<number> {
javaExec = javaExec || path.join(await getJavaHome(), "bin", "java");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have to differ java.exe vs java by platforms?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, running "java" and "java.exe" in shell both works in windows.

@testforstephen testforstephen merged commit 4c0df75 into microsoft:master Dec 16, 2020
@testforstephen testforstephen deleted the javaVersion branch December 16, 2020 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Find Java version from release file

2 participants