Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

Java and Windows COM

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

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.
 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You may also want to look into Ant libraries that support that.
 
Oleg Tim
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am sorry, I didnt understand. Ant libraries support what? COM bridge or Windows level functionality?

Thanks
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I too am interested in this. I found a couple of references, but I would be curious if anyone has any experience with doing this.

The JACOB project has been recommended more than once - but I have not tried it. Has anyone worked with this?

There is also the Jacobgen project: Jacobgen website which might also help.
 
Oleg Tim
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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/

Any experience?
 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Randall Julian
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).
 
Hey! You're stepping on my hand! Help me tiny ad!
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic