2

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.

4

4 回答 4

1

总是有 JNI 和 JNA,但如果您还不了解 C 或 C++,则将涉及到学习曲线,尤其是 JNI:JNI 参考JNA 站点

于 2010-11-28T22:34:42.923 回答
1

在过去的几个月里,我不得不将一些 C、C++ 和 Win32 替代方案与我的 Java 项目混合用于本地访问。经过与 JNA 以及最近与 JInvoke 进行此类集成的大量工作后,我可以告诉您 JInvoke 比 JNA 稍微成熟一些。即使 JInvoke 比 JNA 更老,我发现它的语法更简洁。对于那些喜欢 JNA 但使用 JInvoke 的人来说抱歉,我可以从 Java 中直接挂钩 windows api。

于 2013-08-23T03:27:32.853 回答
0

I see there's a commercial library called JInvoke that:

enables Java developers to easily invoke native methods (such as the Win32 API or C-based Windows DLLs and Unix dynamic libraries) with pure Java code.

However I'd prefer something free and specifically targetted at the WinInet API.

于 2010-11-28T22:28:31.753 回答
0

看看 JACOB 项目

JACOB 是一个 JAVA-COM 桥接器,它允许您从 Java 调用 COM 自动化组件。它使用 JNI 对 COM 库进行本机调用。JACOB 在支持 32 位和 64 位 JVM 的 x86 和 x64 环境中运行

http://sourceforge.net/projects/jacob-project/

于 2010-11-29T09:11:55.207 回答