Native Keyword / Calling C Program From Java

Native Keyword / Calling C Program From Java

You might have seen in Java API many methods are using native keyword. Lets understand them.

The native keyword is applied to a method to indicate that the method is implemented in native code using JNI.

Definition From JSR
A method that is native is implemented in platform-dependent code, typically written in another programming language such as C, C++, FORTRAN,or assembly language. The body of a native method is given as a semicolon only, indicating that the implementation is omitted, instead of a block.

Still looking more .. google it 🙂

Lets start with an example :

see this link

Stay Tuned… will post an example soon.

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.