[graalvm-users] Reading from static resource file
m.bungart at gmx.net
Wed Feb 13 05:23:55 PST 2019
I have a problem with resource files when building native images. I
would like to read the content of a resource file. The snippet of code
accessing the file is:
String PATH = "/wordCount/le_grand_cyrus.txt";
BufferedInputStream is =
BufferedReader reader = new BufferedReader(new
System.out.println(is.available()); // Exception occurs here
running the program on the JVM works just fine.
When I, however, compile the jdk to an native image, the program
Exception in thread "main" java.io.IOException: Stream closed
I compiled the native image with -H:IncludeResources='...'
-H:Log=registerResources to verify that the files are included in the
Am I doing something wrong or is this a known issues? Any help is much
Thanks in advance,
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: OpenPGP digital signature
Url : http://oss.oracle.com/pipermail/graalvm-users/attachments/20190213/8bbaacf2/attachment.bin
More information about the GraalVM-Users