Skip to content
This repository was archived by the owner on Mar 21, 2023. It is now read-only.
This repository was archived by the owner on Mar 21, 2023. It is now read-only.

Metals fails to start when -XX:+PrintCommandLineFlags is defined #203

Description

@sideeffffect

Whenever a JDK_JAVA_OPTIONS or JAVA_TOOL_OPTIONS environment variable is defined, Metals fails to start. Even if the content is something as innocent as -XX:+PrintCommandLineFlags. The log looks like this.

Java home: /usr/lib/jvm/adoptopenjdk-11-hotspot-amd64
Metals version: 0.9.5
[Error - 5:01:04 PM] Connection to server is erroring. Shutting down server.
[Error - 5:01:04 PM] Connection to server is erroring. Shutting down server.
[Error - 5:01:04 PM] Connection to server is erroring. Shutting down server.
[Error - 5:01:04 PM] Connection to server is erroring. Shutting down server.
NOTE: Picked up JDK_JAVA_OPTIONS: -XX:+PrintCommandLineFlags
Error: -classpath requires class path specification

(Exception is, if the variable is defined as an empty string or a white space, like " ", then Metals works normally as well.)

Metals should work well, even in the presence of these (officially supported 1, 2) environment variables.

On Ubuntu 20.04.

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