Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot set --add-opens jvm setting #1604

Open
Matzz opened this issue Apr 15, 2024 · 0 comments
Open

Cannot set --add-opens jvm setting #1604

Matzz opened this issue Apr 15, 2024 · 0 comments

Comments

@Matzz
Copy link

Matzz commented Apr 15, 2024

Expected behaviour

I need to set --add-opens=java.base/sun.nio.ch=ALL-UNNAMED for my application.

Actual behaviour

When I set javaOptions += "-J--add-opensss=java.base/sun.nio.ch=ALL-UNNAMED" it fails with Unrecognized option: -J--add-opensss=java.base/sun.nio.ch=ALL-UNNAMED during the tests.
Setting javaOptions += "--add-opens=java.base/sun.nio.ch=ALL-UNNAMED" does not fail but app fails with java.lang.reflect.InaccessibleObjectException: Unable to make field private final java.util.Set sun.nio.ch.SelectorImpl.selectedKeys accessible: module java.base does not \"opens sun.nio.ch\" ....
So ut seems that --add-opens was not applied to jvm configuration.

Information

  • What sbt-native-packager are you using
    1.9.16
  • What sbt version
    1.9.6
  • What is your build system (e.g. Ubuntu, MacOS, Windows, Debian )
    MacOS
  • What package are you building (e.g. docker, rpm, ...)
    docker
  • What is your target system (e.g. Ubuntu 16.04, CentOS 7)
    Linux Alpine
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

No branches or pull requests

1 participant