![]() The agent then generates the files jni-config.json, reflect-config.json, proxy-config.json and resource-config.json in the specified output directory, which is /path/to/config-dir/ in the example above. Note that -agentlib must be specified before a -jar option or a class name or any application parameters in the java command line.ĭuring execution, the agent interfaces with the Java VM to intercept all calls that look up classes, methods, fields, resources, or request proxy accesses. ![]() ![]() It can be enabled on the command line of the GraalVM java command: $JAVA_HOME/bin/java -agentlib:native-image-agent=config-output-dir=/path/to/config-dir/. In order to make preparing these configuration files easier and more convenient, GraalVM provides an agent that tracks all usages of dynamic features of an execution on a regular Java VM. Undetected usages of these dynamic features need to be provided to the native-image tool in the form of configuration files. However, this analysis cannot always completely predict all usages of the Java Native Interface (JNI), Java Reflection, Dynamic Proxy objects ( ), or class path resources ( Class.getResource). Native images are built ahead of runtime and their build relies on a static analysis of which code will be reachable. Assisted Configuration with Tracing Agent
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |