Skip to content

Conversation

@jkremser
Copy link

GraalVM's native-image tool can create executable self-contained applications out of jar files by doing a lot of magic, like evaluating static initializers during the compilation, making a snapshot of the memory heap, etc. However sometimes some classes' initialization need to be deferred to run-time to pass the build. This PR adds the property file that is read by the native-image tool during the compilation and the argumets are appended to the build tool. It's harmless for the jar itself and will be ignored by all the other tools.

Namely, it adds these classes:

  • com.mongodb.UnixServerAddress
  • com.mongodb.internal.connection.SnappyCompressor

… com.mongodb.UnixServerAddress and com.mongodb.internal.connection.SnappyCompressor to the run-time
@rozza
Copy link
Member

rozza commented Dec 12, 2019

Hi @jkremser,

Thanks for the ticket, I've added https://jira.mongodb.org/browse/JAVA-3537 to track this feature request.

Ross

@jkremser
Copy link
Author

jkremser commented Jan 7, 2020

should I close this one on behalf of rozza#345 ?

@rozza
Copy link
Member

rozza commented Jan 7, 2020

Hi @jkremser - I rebased your change, made a minor change (removed the clirr addition) and once ok'd it will be merged into master for the forthcoming 4.0 release.

You can close this or I'll close once its in master.

Once again, many thanks for bringing this to our attention and providing the original PR.

@jkremser jkremser closed this Jan 7, 2020
@jkremser jkremser deleted the native-image-properties branch January 7, 2020 16:07
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

Successfully merging this pull request may close these issues.

2 participants