开发者

Access file from jar via native code

I have an applet which contains some images, regular java classes and class, which uses C code via JNI. All this is included in jar file, and the appropriate dll is located somewhere on a harddrive. In C code I have to read a bitmap from the applet(jar开发者_StackOverflow中文版). I know that it is simple to access this file from java via getResourceAsStream() method, but can I do it from native code?

I understand that I can pass the bytes of the bitmap to native code as a workaround, but it requires some rewriting, so I would like to avoid this.

So, is there any way to access files from within jar via native code, executed by class belonging to this jar?


Just call the appropriate Java methods.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜