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 Answers
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.

- 101
- 5
-
Notice that JInvoke has been discontinued a long time, I don't know exactly how long, but even so it's a good hook tool for native access. Other good alternative would be Python, which has a powerful win32 api as well as the ability to be mixed up with or from java code through Jython. – David Archanjo Aug 23 '13 at 10:53
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

- 283,665
- 25
- 256
- 373
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.

- 1
- 1

- 13,427
- 22
- 69
- 98
-
Don't answer your own question. Edit the original, or comment on it. – user207421 Nov 29 '10 at 00:30
-
From the FAQ: "It's also perfectly fine to ask and answer your own question". I agree that clarifications etc shouldn't take the form of answers. – Andrew Swan Nov 29 '10 at 04:35
Have a look at JACOB project
JACOB is a JAVA-COM Bridge that allows you to call COM Automation components from Java. It uses JNI to make native calls to the COM libraries. JACOB runs on x86 and x64 environments supporting 32 bit and 64 bit JVMs

- 13,959
- 3
- 55
- 95