Blog Archives

Working with JNI on MAC OSX platform

 In this post, I will discuss about the Java Native Interface(JNI) and Java Virtual Machine(JVM) on Mac OSX.

JNI stands for ‘Java Native Interface’. It will act as an interface between java and other languages. JNI allow a code written written in  languages like C, C++,  Objective-C etc to use java libraries and from java code to use other language code.It means you can call java methods from other languages using JNI and vice versa. Java native methods are flagged by the keyword ‘native’.

Advantages:

  • Use the existing library,
  • Speed of execution,
  • Invoke API functions from product that is developed in C or C++ from a java client and vice versa.

Disadvantages:

  • Run time errors debugging is difficult in native code.An applet can’t call a native methods.
 You can’t say ‘write once run anywhere’.

Introduction to JVM
JVM stands for ‘Java Virtual Machine’. Java Virtual Machine or JVM is a platform independent execution environment that converts Java byte-code into machine code(binary). JVM function is to load the appropriate class files for executing a java program, and then to execute it. Read the rest of this entry

%d bloggers like this: