I am looking to enable my java application to do some tasks on the OS level with Windows 2003 server. For example, creating a user and setting permissions. The only way I could think of is through bridging Java and COM. Is it the best way to do it? If yes can you recommend any good Java to COM Bridge libraries.
Yes, I also read a lot about JACOB, there is a tutorial on using it in Professional JSP by WROX. I am going to try it. JCOM is another one that I found and its praised as really good, one problem is that documentation is not fully translated to English yet. http://sourceforge.net/projects/jcom/
You shouldn't need to resort to COM to "do some tasks on the OS level with Windows 2003 server. For example, creating a user and setting permissions."
This is core Windows OS functionality and it would be easier to accomplish using the Win32 API directly instead of COM.
An simpler and more efficient solution than the overhead of a Java-COM bridge would be to implement one or more native methods using JNI and the Win32 API that do your OS-level tasks, such as "creating a user and setting permissions."
Even if the implementation of the native method itself needed to use COM, that could still be accomplished from the Win32 side of the native method.
Joined: Nov 21, 2004
Since Jacob uses JNI to talk to COM components, it makes sense that you should probably skip the trouble of creating a COM component just to get to things you can get to directly with JNI.
In my case I have a device which comes with a vendor supplied API as a COM component and I'd like to write programs to talk to the device, in Java rather than MSVC++ (ugh).