Skip to content

inconsistent format of version string #1610

@Eskibear

Description

@Eskibear

The context is, we parse output of java -version to determine the version of Java.

Now we have an issue reported by @RohanIRathi in microsoft/vscode-java-pack#309 (comment)
When executing java -version, the output was:

openjdk 11.0.6 2020-01-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.6+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.6+10, mixed mode)

Note that in the first line, 11.0.6 was not quoted, and there was no "version" (literally) before it.

To make it clear, you can compare it with below output, which is from my machine.

openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.6+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.6+10, mixed mode)

I believe the version string should follow some convention or a certain format, and will it be different on different machine? Could that be a potential bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssues that are problems in the code as reported by the communitymacosIssues that affect or relate to the MAC OS

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions