Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does the GNU Java compiler support JNA?

Tags:

java

jna

gcj

I want to write a java program that uses the Windows API and that compiles to native code instead of byte code.

I don't want using JNI (C, C++, ... interface) but instead want to write using pure java code and JNA.

Would the GNU Java compiler allow me to do this? Does the GNU Java compiler support use of JNA?

like image 291
Amir Saniyan Avatar asked Jan 21 '26 17:01

Amir Saniyan


1 Answers

I believe that with the GNU Java compiler, one uses a different interface to link to native code, the CNI (Compiled Native Interface). CNI is related to JNI (Java Native Interface) framework (again, I believe).

Caveat: I have never used the GNU Java compiler nor CNI, but have used JNA and JNI.

like image 180
Hovercraft Full Of Eels Avatar answered Jan 23 '26 05:01

Hovercraft Full Of Eels



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!