Where's System.loadLibrary() in FileInputStream?

R

res7cxbi

I got a good look in the source code for FileInputStream in the J2SE
1.5.0 and noticed a few native methods, including open(), read(), etc.
After looking at the code more, there isn't a System.loadLibrary
anywhere where i would normally see if a class used JNI. How does
FileInputStream know what native library to load then?
 
G

Gordon Beaton

I got a good look in the source code for FileInputStream in the J2SE
1.5.0 and noticed a few native methods, including open(), read(), etc.
After looking at the code more, there isn't a System.loadLibrary
anywhere where i would normally see if a class used JNI. How does
FileInputStream know what native library to load then?

It isn't necessary to explicitly load a library for every class that
uses native code, since the JVM executable already holds much of the
native code used by the standard classes.

/gordon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top