Java Native Interface (JNI)
Java Native Interface (JNI) is one of the intersting interface by java By using Java Native I
This Article is for Simple Java not for Android:
Calling DLLs from Java
Calling C/C++ DLLs from Java
Introduction
In this walkthrough, we will show how C/C++ code compiled into a Windows DLL can be called from Java using J/Invoke.
We will be using Microsoft Visual Studio 2005 to create a DLL with C++ functions, and writing Java code with the help of the Eclipse Java IDE. The steps for other IDEs will be similar. We encourage you to 'walk-through' this exercise with us, even if you are not very familiar with Visual Studio or Eclipse - it is easy, and it is fun!
To run this example, you should be running Windows 2000, XP, Vista or 2003.
J/Invoke requires a Java SE developer kit. As it uses Java annotations, JDK version 5.0 or higher is needed. Get Java here.
Continue Reading ...