• Post Reply Bookmark Topic Watch Topic
  • New Topic

How Can Java communicate with COM Objects?  RSS feed

 
Mike London
Ranch Hand
Posts: 1505
11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Is it possible for Java to communicate (interact) with COM (or ActiveX) objects directly?

I realize this is two questions (COM and ActiveX), but I'm not sure if one or both are possible?

Are there some references somebody could point me to?

Thanks.

-- Mike
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not natively. Sun wanted Java to be OS independent and any COM or ActiveX code wouldn't run on every OS and phone and whatever.

There are a bunch of packages out there to help you do it, though. Google for "java com bridge" or "java activex bridge" and you'll find a lot of hits, some free, some very expensive. One solution called POI has custom APIs for specific office products, I think. Haven't tried it first hand.
 
Jayesh Lalwani
Ranch Hand
Posts: 502
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JACOB is pretty good. I remember there was a similar query few days ago and someone had mentioned JACOB. We tried it a little bit and it seems to work pretty well. Here is the thread http://www.coderanch.com/t/399062/java/java/Equivalent-COM-OLE

Hope that helps
 
Jayesh Lalwani
Ranch Hand
Posts: 502
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Stan James:
Not natively. Sun wanted Java to be OS independent and any COM or ActiveX code wouldn't run on every OS and phone and whatever.

There are a bunch of packages out there to help you do it, though. Google for "java com bridge" or "java activex bridge" and you'll find a lot of hits, some free, some very expensive. One solution called POI has custom APIs for specific office products, I think. Haven't tried it first hand.


POI is not mature enough yet. It works ok for excel files, but it does'nt support Word properly.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!