Learn

You made it! Let’s review what we have learned so far!

  • JNI stands for Java Native Interface. It is a powerful tool that bridges together a Java program and native languages allowing for programmers to take advantage of non-Java methods and libraries in their Java programs.
  • Some common JNI function calls include:
    • Using JNI, we can combine C++ code with Java code and call methods/functions of one type of language into methods/functions of the other language.
    • Implementing JNI within your own requirements requires the following at minimum: a Java compiler, a JVM, a native method C generator. Some things that may be required but need to be accounted for include native header files, and all library files for any libraries that have been called within your program.
  • To implement third-party API, library files must be added to the folders from which this program will be launched, and minor additions must be made to the compilation statement.

Great job!

Instructions

Take a look at the image in this exercise to understand how JNI connects Java to native languages!

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?