What's the easiest way to use C source code in a Java application?

前端 未结 7 2070
野的像风
野的像风 2021-01-12 00:21

I found this open-source library that I want to use in my Java application. The library is written in C and was developed under Unix/Linux, and my application will run on Wi

7条回答
  •  我在风中等你
    2021-01-12 00:54

    Are you sure you want to use the C library, even if it is that small?

    Once 64 bit gets a little more common, you'll need to start building/deploying both 32 bit and 64 bit versions of the library as well. And depending on what the C code is like, you may or may not need to update the code to make it build as 64 bit.

    If the C library is simple, it may be easier to just port the C library to pure java and not have to deal with building/deploying a JNI library, the C library and the java code.

提交回复
热议问题