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.

Unrecognized option: --add-exports #368

Description

@GuillaumeDesforges

Describe the bug

When Starting VSCode, I get

Java home: /nix/store/rjgb7sb2wrhl98gqda31h1iaa7v6nm9y-openjdk-11.0.12+7/lib/openjdk
Metals version: 0.10.8
Unrecognized option: --add-exports java.base/sun.nio.ch=ALL-UNNAMED
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Downloading Metals failed with the following:
Process exited with code 1

To Reproduce

  • Create a simple Scala project
  • Write to .jvmopts
    --add-exports java.base/sun.nio.ch=ALL-UNNAMED
    

Expected behavior

Language server should not crash. Indeed, sbt works fine from console for instance.

Installation:

  • Operating system: Linux
  • Editor: Visual Studio Code
  • Metals version: v0.10.8

Additional context

I am providing OpenJDK and sbt from Nix.
I've tried providing metals from Nix as well, but it did not fix my issue.

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