How to use winapi functions in java?

前端 未结 3 2174
误落风尘
误落风尘 2020-12-09 13:32

I am doing a project in java which has the function to add files in database, and i want to use winapi functions to select files. How would i do that?

3条回答
  •  不知归路
    2020-12-09 14:03

    By far the easiest way is by using Java JNA, it already has translation from stcalls in.

    You can find a basic tutorial for it (with Winapi example no less) on JavaWorld.

    You could also use JNI, but JNI requires you to use specially built header files for interfacing and it's all in all harder to maintain and use. It's slightly faster in some cases though.

提交回复
热议问题