-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[GR-42823] Add native-image API for defining built-in system-properties for image-runtime #5557
Comments
Originally suggested here: #4862 (comment) |
|
Exposing the variant with the supplier requires a very compelling use-case, as this goes beyond what you can do on the JVM. Also note that the supplier-variant has less trivial semantics. On first access to |
For our usecase, before we switched to GraalVM native-image we were using Excelsior JET. This did not allow you to pass JVM properties to the exe directly, and this used environment variables. For now we're doing everything in a helper class that sets all these properties accordingly, which we're calling as first thing in all our entrypoints. |
There is nothing wrong with that 🙂 |
No there isn't, except if an additional entrypoint is created, whoever is doing it has to be aware of the obligatory boilerplate required to make native-image work as well. |
…es for image-runtime #5557. PullRequest: graal/13313
Fixed since commit a349076
|
Based on @kristofdho's suggestion we should add an API method that allows users to define system-property key-value pairs that are automatically available at image runtime. This already exists internally as
ImageSingletons.lookup(SystemPropertiesSupport.class).initializeProperty("property.name", "value")
and should be made available though public API.The text was updated successfully, but these errors were encountered: