Skip to content
Advertisement

Tag: substratevm

GraalVM native-image how to read resource file from Jar

I have a jar file which contain some text file inside, I am trying to load the file as: InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream(path); It doesn’t work as error showing : If I try to extract the resource file into classpath src/main/resources, then it is working fine. My question is, could we read resource file from Jar (when running in GraalVM

Advertisement