如何在Java中使用Winapi函数? [英] How to use winapi functions in java?

查看:41
本文介绍了如何在Java中使用Winapi函数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在用Java执行一个项目,该项目具有在数据库中添加文件的功能,并且我想使用winapi函数来选择文件.我该怎么办?

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?

推荐答案

到目前为止,最简单的方法是使用 Java JNA,它已经具有stcall的翻译.

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

您可以在您也可以使用JNI,但是JNI要求您使用专门构建的头文件进行接口连接,而这一切都很难维护和使用.不过在某些情况下,速度会稍快一些.

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.

这篇关于如何在Java中使用Winapi函数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆