Using eclipse, I see that methods like System.nanotime()
or System.arraycopy()
are native.
However I could not see the definitions of these methods.
Where are can I find the definitions , and more importantly what language are those methods written in ?
Asked
Active
Viewed 91 times
0

Kanwaljeet Singh
- 1,215
- 4
- 15
- 25
-
2Surely the clue is in the name - `native`. The methods are written in C or C++ tailored to the platform in question. The code depends on the exact version of the JRE you are using and the platform you are using it on. – Boris the Spider Mar 08 '14 at 11:34
1 Answers
-1
Install the Java SE Development Kit from http://java.sun.com/javase/downloads/index.jsp. Once installed, you should find an archive called src.zip in the top of the JDK installation directory. The Java source code is in there.

S4beR
- 1,872
- 1
- 17
- 33
-
These don't contain the **native** sources. Although the asker used the term *"definitions"*, which may be misleading, he most likely was looking for something like in this answer http://stackoverflow.com/a/6502320 – Marco13 Mar 08 '14 at 14:17