如何从 Java 使用 WinInet API?
根据 这个答案 我之前的一个问题, WinInet< /a> Windows API 是在 Windows 中读写 Internet 连接设置的正确方法。我如何从 Java 使用此 API?我更喜欢免费的开源解决方案。
According to this answer to an earlier question of mine, the WinInet Windows API is the correct way to read and write internet connection settings in Windows. How can I use this API from Java? I'd prefer a free, open-source solution.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
总会有 JNI 和 JNA,但如果您还不了解 C 或 C++,则会涉及到学习曲线,尤其是 JNI:JNI 参考,JNA 站点
There's always JNI and JNA, but if you don't already know C or C++ there'll be a learning curve involved, especially with JNI: JNI Reference, JNA Site
在过去的几个月里,我不得不将一些 C、C++ 和 Win32 替代方案与我的 Java 项目混合以进行本机访问。经过与 JNA 的大量合作以及最近与 JInvoke 的集成,我可以告诉您 JInvoke 比 JNA 成熟一点。即使JInvoke比JNA更老,我发现它的语法更简洁。对于那些喜欢 JNA 的人来说很抱歉,但是使用 JInvoke 我可以从 Java 中挂钩 Windows api。
Over the last months I had to mix with my Java project some C, C++ and Win32 alternatives for native access. After a lot work with JNA and recently with JInvoke for such integration, I can tell you that JInvoke is a little mature than JNA. Even JInvoke be older than JNA, I found its syntax more concise and simple. Sorry for those who loves JNA but using JInvoke I could literally hook the windows api from Java.
我看到有一个名为 JInvoke 的商业库:
不过,我更喜欢免费的、专门针对 WinInet API 的东西。
I see there's a commercial library called JInvoke that:
However I'd prefer something free and specifically targetted at the WinInet API.
看看 JACOB 项目
http://sourceforge.net/projects/jacob-project/
Have a look at JACOB project
http://sourceforge.net/projects/jacob-project/