-
Java and COM?
I need to know whether it is possible to talk to a COM object from a Java
application? The scenario is this...
ActiveX .Exe running on a desktop system. The ActiveX .Exe exposes methods,
properties and events through a COM interface. Can a Java application (or
applet) talk to (access properies, invoke methods, respond to events) this
ActiveX .Exe?
Any help would be greatly appreciated.
Thanks,
chris
-
Re: Java and COM?
I hear that Microsoft's version of Java allows you to do something like
that. Alternatively, you can find something on IBM's Alphaworks site that
appears to do it too:
Go to http://www.alphaworks.ibm.com/tech, click on Java in the left frame
and select Bridge2Java in the drop-down list. Here's the blurb from that
page:
"Bridge2Java allows easy integration of ActiveX objects into a Java
Environment. Using the Java Native Interface and COM technology, Bridge2Java
allows the Java programmer to treat an ActiveX object just like a Java
object. To use Bridge2Java, the user simply has to run a proxy generating
tool which creates Java proxies from the ActiveX controls's typelib. The
user then uses these proxies to allow a Java program to communicate with the
ActiveX object."
chris <cpoulton@excite.com> wrote in message
news:396a4380$1@news.devx.com...
>
>
> I need to know whether it is possible to talk to a COM object from a Java
> application? The scenario is this...
>
> ActiveX .Exe running on a desktop system. The ActiveX .Exe exposes
methods,
> properties and events through a COM interface. Can a Java application (or
> applet) talk to (access properies, invoke methods, respond to events) this
> ActiveX .Exe?
>
> Any help would be greatly appreciated.
>
> Thanks,
>
> chris
>
-
Re: Java and COM?
I posted a similar question a few weeks back and received some replies. Here's
what I've learned (and done).
You need to get a 'bridge' product. Try the "bridge2java" product from alphaworks
at ibm - alphaworks.ibm.com. I couldn't quite figure out the licensing on
this so watch out. This product has a proxy generating tool to create your
java files. These, in turn, use an object (OleEnvironment) to initialize
your com object. It is pretty easy to use.
Another product that is completely free is from Dan Adler called JACOB -
java-com bridge. This one doesn't come with the proxy generating tool but
you can do it yourself if you look through enough sample code and doc at
ms. I liked this one better as the licensing is very clear. You can get
it at users.rcn.com/danadler/jacob
"chris " <cpoulton@excite.com> wrote:
>
>
>I need to know whether it is possible to talk to a COM object from a Java
>application? The scenario is this...
>
>ActiveX .Exe running on a desktop system. The ActiveX .Exe exposes methods,
>properties and events through a COM interface. Can a Java application (or
>applet) talk to (access properies, invoke methods, respond to events) this
>ActiveX .Exe?
>
>Any help would be greatly appreciated.
>
>Thanks,
>
>chris
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks