简体   繁体   中英

How does java.lang.Object class load native fucntions?

When I create JNI code I must use System.load() or System.loadLibrary() method to load DLL created in C or C++ in order to use native functions.

But how do classes like java.lang.Object or java.lang.System load their own native functions like hashCode() or clone() or setOut0(PrintStream out) , and where does that library reside?

JVM通过JNI函数RegisterNatives()代表Object和其他一些类执行此操作。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM