Is it possible to find the source for a Java native method?

前端 未结 2 1495
梦如初夏
梦如初夏 2020-12-05 21:41

I have found the clone() method of Object in Java:

 protected native Object clone() throws CloneNotSupportedException;
2条回答
  •  庸人自扰
    2020-12-05 22:14

    I found these files, but all they do is import the function from elsewhere. I can't find the actual source (try asking a Hotspot dev).

    Object.c jvm.h

    Edit: Here's a link to the actual source online (Thanks user439407 for finding which file it was in)

提交回复
热议问题