开发者

Can some one tell me a way to find the native implementations of java methods?

开发者 https://www.devze.com 2023-03-29 19:45 出处:网络
Can some one tell me a way to find the native implementations of java method开发者_JAVA技巧sYou can get the complete source for openjdk including the (c/c++) implementations of the native methods here

Can some one tell me a way to find the native implementations of java method开发者_JAVA技巧s


You can get the complete source for openjdk including the (c/c++) implementations of the native methods here: http://download.java.net/openjdk/jdk6/

(There are bundles for jdk 7 and jdk 8 too)


Native implementation of java function are done in JNI. If you have a class call org.abc.MyClass.java, its JNI implementation fora ny native function wil be in a file like org_abc_MyClass.c.


Dowload the jdk(link posted in previous answer) then use locate(to search name) and ack(a grep replacement to find stuff located inside the files, ex. ack --java "regex")

0

精彩评论

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