This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Java in General and the fly likes ActiveX in a Java application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "ActiveX in a Java application" Watch "ActiveX in a Java application" New topic

ActiveX in a Java application

Annalisa B

Joined: Jan 21, 2004
Posts: 2
Hi there, is there anybody who can explain me how I can insert an ActiveX component in my Java application? I've only read about differences between java beans and ActiveX components, but no tips on how doing it. I'm developing with Eclipse. It's been quite easy with Visual J++, but I'd prefer to use Eclipse...
Every suggestion will be appreciated..
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
ActiveX is a Windows thing, and Java by its whole purpose refuses to do any platform-specific things, so Java has no native support for ActiveX. If you Google for "Java COM bridge" or "Java ActiveX bridge" you will find a variety of open source and commercial products. We had fair to good luck with Jacob from Adler lists some other resources, too.
I was tickled with how easy Visual J++ made it to create and use COM and ActiveX objects, but Sun was not. Bummer, cause if you were in a dedicated Windows/COM/ActiveX shop J++ was a nice alternative to VB.
Another option we have been forced to use a time or two is to write a C++ wrapper around the COM object, and call the wrapper from Java using JNI. Not real pretty, but it works.

A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Annalisa B

Joined: Jan 21, 2004
Posts: 2
Thenk you very much, you've been very clear and you detailed much where I can look for. You've also been the one who replied to me! It must not be so common to do what I'm trying to do, but I have an ActiveX and I' m trying to embed it in most of the applications...I'll look for where you suggested!
Thank you so much,
I agree. Here's the link:
subject: ActiveX in a Java application
jQuery in Action, 3rd edition