Class RuntimeResourceAccess
java.lang.Object
org.graalvm.nativeimage.hosted.RuntimeResourceAccess
This class can be used to register Java resources and ResourceBundles that should be accessible
at run time.
- Since:
- 22.3
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddResource(Module module, String resourcePath) Make Java resourceresourcePathfrommoduleavailable at run time.static voidaddResource(Module module, String resourcePath, byte[] resourceContent) Inject a Java resource atresourcePathinmodulewith the specifiedresourceContent.static voidaddResourceBundle(Module module, String bundleName) Make Java ResourceBundle that is specified by abundleNamefrom modulemoduleavailable at run time.static voidaddResourceBundle(Module module, String baseBundleName, Locale[] locales) Make Java ResourceBundle that is specified by abaseBundleNameandlocalesfrom modulemoduleavailable at run time.
-
Method Details
-
addResource
-
addResource
Inject a Java resource atresourcePathinmodulewith the specifiedresourceContent. At runtime the resource can be accessed as if it was part of the original application. If the givenmoduleis unnamed, the resource is placed on the classpath instead.- Since:
- 22.3
-
addResourceBundle
Make Java ResourceBundle that is specified by abaseBundleNameandlocalesfrom modulemoduleavailable at run time. If the givenmoduleis unnamed, the ResourceBundle is looked up on the classpath instead.- Since:
- 22.3
-
addResourceBundle
-