Introduction to JNI with Eclipse, GCC and MSYS2

preview_player
Показать описание
This guide shows how to use Java's JNI to interact with code written in C. I show the entire process:

-Installing Java from AdoptOpenJDK.
-Installing the Eclipse IDE for Java Developers, plus the CDT and TM Terminal plug-ins.
-Installing MSYS2 with MinGW-W64.
-Setting up the PATH environment variable.
-Testing the Eclipse toolchain.
-Writing the Java portion of the JNI code.
-Writing the C portion of the JNI code.
-Writing a simple Makefile.
-Compiling the JNI code into a DLL file.
-Testing the code and benchmarking performance.
-Highlighting the performance benefits of using Java's ByteBuffers instead of byte arrays.

The JNI code written for this guide is a simple to use library for interacting with FTDI's D2XX API. Source code and notes are available on my web site:

This video expands upon my previous video, which explained how to use the D2XX API with Visual Studio:

Рекомендации по теме
Комментарии
Автор

Hi, I exactly followed you but I am stuck at this error:

*make header*
*mkdir -p jni
*
*process_begin: CreateProcess(NULL, mkdir -p jni, ...) failed.
*
*make (e=2): The system cannot find the file specified.
*

*make: [makefile:2: header] Error 2
*
*"make header" terminated with exit code 2. Build might be incomplete.*


I don't know why this is happening. I followed your every step but I am not able to fix this issue please help.

ramesh.programming
Автор

Here's my full course:
Please share it as much as possible.

javaforengineersYT