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

JAVA_OPTS are not picked up by spawned JVM #117

Open
nolondil opened this issue Aug 29, 2024 · 2 comments
Open

JAVA_OPTS are not picked up by spawned JVM #117

nolondil opened this issue Aug 29, 2024 · 2 comments

Comments

@nolondil
Copy link

We have our own certificate for the JVM and setting the path to the trust store and password in the JAVA_OPTS make it visible within the SBT Shell.

But running the reStart the link to those is lost and the JVM fail to validate the certificates, we can work around that by adding the path in the javaOptions of the reStart but it would be better to leverage the JAVA_OPTS directly (or pass the same JVM arguments from the sbt shell to the reStart with extra define in reStart / javaOptions)

@jrudolph
Copy link
Member

jrudolph commented Aug 29, 2024 via email

@nolondil
Copy link
Author

nolondil commented Sep 3, 2024

As far as I understand, Zulu is also adding the JAVA_OPTS when running java outside an sbt shell 🤷🏻‍♂️

FWIW, as we need to link specific certificates to the JVM, this is how we could still make those trust store visible in our shared code (without being specific):

val trustStorePath = sys.env.getOrElse("TRUSTSTOREPATH", "NO_PATH")
val trustStorePwd = sys.env.getOrElse("TRUSTSTOREPWD", "NO_PWD")

    reStart / javaOptions ++= Seq(
      s"-Djavax.net.ssl.trustStore=$trustStorePath",
      S"-Djavax.net.ssl.trustStorePassword=$trustStorePwd
    ) 

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

2 participants