Package org.graalvm.nativeimage.hosted
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 void
addResource
(Module module, String resourcePath) Make Java resourceresourcePath
frommodule
available at run time.static void
addResource
(Module module, String resourcePath, byte[] resourceContent) Inject a Java resource atresourcePath
inmodule
with the specifiedresourceContent
.static void
addResourceBundle
(Module module, String bundleName) Make Java ResourceBundle that is specified by abundleName
from modulemodule
available at run time.static void
addResourceBundle
(Module module, String baseBundleName, Locale[] locales) Make Java ResourceBundle that is specified by abaseBundleName
andlocales
from modulemodule
available at run time.
-
Method Details
-
addResource
Make Java resourceresourcePath
frommodule
available at run time. If the givenmodule
is unnamed, the resource is looked up on the classpath instead.- Since:
- 22.3
-
addResource
Inject a Java resource atresourcePath
inmodule
with the specifiedresourceContent
. At runtime the resource can be accessed as if it was part of the original application. If the givenmodule
is unnamed, the resource is placed on the classpath instead.- Since:
- 22.3
-
addResourceBundle
Make Java ResourceBundle that is specified by abaseBundleName
andlocales
from modulemodule
available at run time. If the givenmodule
is unnamed, the ResourceBundle is looked up on the classpath instead.- Since:
- 22.3
-
addResourceBundle
Make Java ResourceBundle that is specified by abundleName
from modulemodule
available at run time. If the givenmodule
is unnamed, the ResourceBundle is looked up on the classpath instead.- Since:
- 22.3
-