Programming JNI with Delphi

前端 未结 2 1129
遥遥无期
遥遥无期 2021-01-02 10:51

Can I use Delphi to program to the Java Native Interface? From reading Essential JNI it seems possible if you make sure you are using the C calling convention. Anyone done t

2条回答
  •  臣服心动
    2021-01-02 11:07

    Besides JNI there is also Java Native Access (JNA) which requires much less setup (no C header files) so your Delphi DLL functions (and callbacks) can be used directly from Java:

    JNA Homepage

    JNA provides Java programs easy access to native shared libraries (DLLs on Windows) without writing anything but Java code—no JNI or native code is required. This functionality is comparable to Windows' Platform/Invoke and Python's ctypes. Access is dynamic at runtime without code generation.

提交回复
热议问题