anchor.diff:  }
   ----
   
  -Using such a construct means that a `--delay-class-initialization-to-runtime` option will automatically be added to the `native-image` command line
  -
  -For more information about `--delay-class-initialization-to-runtime`, please read https://medium.com/graalvm/understanding-class-initialization-in-graalvm-native-image-generation-d765b7e4d6ed[this blog post].
  -
  -== Proxy Classes management
  -
  -While writing native application you'll need to define proxy classes at image build time by specifying the list of interfaces that they implement.
  -
  -In such a situation the error you might encounter is:
  -
  -[source]
  -----
  -com.oracle.svm.core.jdk.UnsupportedFeatureError: Proxy class defined by interfaces [interface org.apache.http.conn.HttpClientConnectionManager, interface org.apache.http.pool.ConnPoolControl, interface com.amazonaws.http.conn.Wrapped] not found. Generating proxy classes at runtime is not supported. Proxy classes need to be defined at image build time by specifying the list of interfaces that they implement. To define proxy classes use -H:DynamicProxyConfigurationFiles=<comma-separated-config-files> and -H:DynamicProxyConfigurationResources=<comma-separated-config-resources> options.
  -----
  -
  -Quarkus allows extensions authors to register a `SubstrateProxyDefinitionBuildItem`. An example of doing so is:
  +Using such a construct means that a `--initialize-at-run-time` option will automatically be added to the `native-image` command line.
  +
  +[NOTE]
  +====
  +For more information about `--initialize-at-run-time`, please read https://github.com/oracle/graal/blob/master/substratevm/CLASS-INITIALIZATION.md[the GraalVM documentation].
  +====
  +
  +=== Managing Proxy Classes
  +
  +Very similarly, Quarkus allows extensions authors to register a `SubstrateProxyDefinitionBuildItem`. An example of doing so is:
   
   [source,java]
   ----
  
positive.code: 
  include::./attributes.adoc[]
  
  This guide contains various tips and tricks for getting around problems that might arise when attempting to run java applications as native executables.
  
  == Register reflection
  
  Due to the fact that when building a native executable GraalVM operates with a closed world assumption (which enables it to remove all unused code, which in turns yields multiple benefits), reflection targets need to be explicitly declared.
  
  An example of failing to explicitly specify reflection is the following:
  
  [source]
  ----
  Caused by: org.xml.sax.SAXException: SAX2 driver class com.sun.org.apache.xerces.internal.parsers.SAXParser not found
  java.lang.ClassNotFoundException: com.sun.org.apache.xerces.internal.parsers.SAXParser
  at org.xml.sax.helpers.XMLReaderFactory.loadClass(XMLReaderFactory.java:230)
  ----
  
  If one were to execute the native executable generation process manually, the `-H:ReflectionConfigurationFiles=` flag would be used to point to a JSON configuration file that specifies the program elements that would be accessed reflectively.
  
  Quarkus however makes registration of reflection a breeze by using the `ReflectiveClassBuildItem`, thus eliminating the need for such a JSON configuration file.
  
  To solve the problem shown in the example above one would need to create a Quarkus processor class and add a build step that registers reflection.
  A simple example could like the following:
  
  [source,java]
  ----
  
negative.code: }
  ----
  
  Using such a construct means that a `-H:DynamicProxyConfigurationResources` option will automatically be added to the `native-image` command line.
  
  [NOTE]
  ====
  For more information about Proxy Classes you can read https://github.com/oracle/graal/blob/master/substratevm/DYNAMIC_PROXY.md[the GraalVM documentation].
  ====
  