Open cmeiklejohn opened 3 months ago
@cmeiklejohn Thanks for the detailed report. Unfortunately I have no real experience with GraalVM, so I wouldn't even know where to begin helping you. However, my suspicion (given that the result list is empty) is that the classpath is not properly set up at build time to include the jars or directories that you want to scan.
It is important to get this right for GraalVM users though, so I'm glad you're reporting the issues you run into in the bug tracker of the example project! Thanks!
I'm doing something very similar as to what is being done in this example project. However, it doesn't seem like my classes are being initialized correctly.
Simply, I'm just trying to collect a list of classes, based on some filtering, and build a map of those classes for use later.
Here's the code for
com.mycompany.MyClass
, that passes a unit test successfully without native compilation.When running the native test, I've done the following:
First, I've used the build options to ensure this static initializer is actually called:
Then, using the
PrintClassInitialization
CSV result, I verified that the class is being included/initialized at build time:However, when I run the native test, the static map that I am initializing is empty -- am I missing an obvious step?
Thank you for your help!