What is the meaning of JNI?

I am new to Java and have been told to use the Java Native interface to run code written in C.

Now, this might be a dumb question, but what is the point of JNI? Can't I just execute my process using the Java UI program and make it output parsing?

Also, I read that using JNI can lead to security issues. Are these problems directly dependent on the quality of the code being called? Or is it something deeper?

Thank.

+5
source share
3 answers

what is the jni point?

It allows you to mix C and Java code in the same process.

Can't I just execute my process using the Java UI program and get its syntax for analysis?

, JNI, (IPC). , , . , IPC , JNI (, C).

, , JNI . ? - ?

, JVM , , Java- , , , .., . , ( C).

, JNI JVM. C (, ), .

+6

Java UI ?

, , - ? ? ( .)

, , JNI . ?

. , Java, JVM. (, ), , .

, Java JNI - , , . SWIG, .

+2

Java UI ?

, .

, JNI, .

, , .

+1

All Articles