Skip to content

Fails to find version when JAVA_TOOL_OPTIONS is set #138

@nh13

Description

@nh13

For example, if we set the JAVA_TOOL_OPTIONS environment variable

export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8

then the first line is not the version:

$ java -version                                
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
openjdk version "1.8.0_322"
OpenJDK Runtime Environment (Zulu 8.60.0.21-CA-macos-aarch64) (build 1.8.0_322-b06)
OpenJDK 64-Bit Server VM (Zulu 8.60.0.21-CA-macos-aarch64) (build 25.322-b06, mixed mode)

The getActualJavaVersion looks only at the first line (see here).

Ideally, it would skip over leading lines that start with Picked up. Related to nextflow-io/nextflow#1716

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions