Class RuntimeResourceAccess

java.lang.Object
org.graalvm.nativeimage.hosted.RuntimeResourceAccess

public final class RuntimeResourceAccess extends Object
This class can be used to register Java resources and ResourceBundles that should be accessible at run time.
Since:
22.3
  • Method Details

    • addResource

      public static void addResource(Module module, String resourcePath)
      Make Java resource resourcePath from module available at run time. If the given module is unnamed, the resource is looked up on the classpath instead.
      Since:
      22.3
    • addResource

      public static void addResource(Module module, String resourcePath, byte[] resourceContent)
      Inject a Java resource at resourcePath in module with the specified resourceContent. At runtime the resource can be accessed as if it was part of the original application. If the given module is unnamed, the resource is placed on the classpath instead.
      Since:
      22.3
    • addResourceBundle

      public static void addResourceBundle(Module module, String baseBundleName, Locale[] locales)
      Make Java ResourceBundle that is specified by a baseBundleName and locales from module module available at run time. If the given module is unnamed, the ResourceBundle is looked up on the classpath instead.
      Since:
      22.3
    • addResourceBundle

      public static void addResourceBundle(Module module, String bundleName)
      Make Java ResourceBundle that is specified by a bundleName from module module available at run time. If the given module is unnamed, the ResourceBundle is looked up on the classpath instead.
      Since:
      22.3