ActiveX Container in Java

D

Dan

Hi everyone,
I've been looking all over the place for an ActiveX Container in Java.
If I cant find one I'll write one but I dont know where how. I know that
using the JavaBeans to COM bridge from sun I am able to have my
JavaBeans run in any ActiveX container but not the other way around. I
was hoping that someone could help me out with this.

Has anyone seen anywhere an ActiveX container written in Java? If not
does anyone know how I would write my own container if it is possible.

Also I'm using Sun's Java not Microsofts Java.

Help would be very much appreciated.

Daniel
 
J

joeking

Dan said:
Hi everyone,
I've been looking all over the place for an ActiveX Container in Java.
If I cant find one I'll write one but I dont know where how. I know that
using the JavaBeans to COM bridge from sun I am able to have my
JavaBeans run in any ActiveX container but not the other way around. I
was hoping that someone could help me out with this.

Has anyone seen anywhere an ActiveX container written in Java? If not
does anyone know how I would write my own container if it is
possible.


At the risk of stating the obvious, I suspect you'll need to use
JNI (Java Native Interface). Naturally your Java will no longer be
platform neutral, but then again I suppose you abandoned any notions
of cross-platform-ability when you elected to use ActiveX. ;-)
http://java.sun.com/j2se/1.4.2/docs/guide/jni/


-FISH- ><>
 
J

joeking

Dan said:
Hi everyone,
I've been looking all over the place for an ActiveX Container in Java.
If I cant find one I'll write one but I dont know where how. I know that
using the JavaBeans to COM bridge from sun I am able to have my
JavaBeans run in any ActiveX container but not the other way around. I
was hoping that someone could help me out with this.

Has anyone seen anywhere an ActiveX container written in Java? If not
 
C

Chris Uppal

Dan said:
Has anyone seen anywhere an ActiveX container written in Java?

You might want to look at commercial products like J-Integra and JNIWrapper
(Google should find both for you).

There may well be other commercial offerings, and I know that there are some
free alternatives too (but can't remember any names).

If neither of the above suits your needs, and if you can't find anything
better, then you can create your own. To do that is conceptually simple,
although I suspect the details would be messy. You need:

(1) to learn how to program COM and ActiveX in C or C++.
(2) to learn how to use Java's facility for calling C/C++ code, which is
called JNI.
(3) to put the two together.

(2) and (3) are probably easier than (1), but I can't say for sure since I
don't do COM. Also (3) might be tricky -- or even difficult -- if you want to
mix visual ActiveX controls with Swing components.

-- chris
 
D

Dan

possible.


At the risk of stating the obvious, I suspect you'll need to use
JNI (Java Native Interface). Naturally your Java will no longer be
platform neutral, but then again I suppose you abandoned any notions
of cross-platform-ability when you elected to use ActiveX. ;-)
http://java.sun.com/j2se/1.4.2/docs/guide/jni/


-FISH- ><>



To be honest I dont know a lot about ActiveX, are you saying that
ActiveX is a windows only technology? (i know this has nothing to do
with this newsgroup, but it does follow on in this thread) So do you
know what happens with Microsoft Work for Mac? I know microsoft have got
Word for Mac, but does that mean that the mac version isnt and ActiveX
control at all? Any ideas how I would do the same thing on a mac? Im
trying to embed Word within my Java Application. Alternatively if I
could find a class that allows viewing of a word document that would be
sufficient for my needs. Can anyone help me with this?

By the way, my thanks goes out to both of the replies so far.

Daniel
 
J

joeking

Dan wrote:
[snipped...]
To be honest I dont know a lot about ActiveX, are you saying that
ActiveX is a windows only technology? (i know this has nothing to do
with this newsgroup, but it does follow on in this thread) So do you
know what happens with Microsoft Work for Mac? I know microsoft have got
Word for Mac, but does that mean that the mac version isnt and ActiveX
control at all? Any ideas how I would do the same thing on a mac? Im
trying to embed Word within my Java Application. Alternatively if I
could find a class that allows viewing of a word document that would be
sufficient for my needs. Can anyone help me with this?


I'm no ActiveX expert either, but what I do know (I think!) is that
ActiveX components are native code, so they cannot be moved from one
platform to another. As to whether the iMac has ActiveX, I can't say.
I'm not aware of any Mac implementation, although strictly speaking
there's nothing to stop Microsoft creating an iMac version of ActiveX
(in the same way that they create Mac versions of Internet Explorer)
but that doesn't mean that components are interchangable between Mac
and PC.

Either way you are going to end up shipping platform specific binaries
as part of your app, to enable Java to interface with the native
ActiveX implementation in the given environment (assuming that isn't
just Windows.)
A quick Google reveals:
http://jakarta.apache.org/poi/


-FISH- ><>
 
J

joeking

Dan wrote:
[snipped...]
To be honest I dont know a lot about ActiveX, are you saying that
ActiveX is a windows only technology? (i know this has nothing to do
with this newsgroup, but it does follow on in this thread) So do you
know what happens with Microsoft Work for Mac? I know microsoft have got
Word for Mac, but does that mean that the mac version isnt and ActiveX
control at all? Any ideas how I would do the same thing on a mac? Im
trying to embed Word within my Java Application. Alternatively if I
could find a class that allows viewing of a word document that would be
sufficient for my needs. Can anyone help me with this?


I'm no ActiveX expert either, but what I do know (I think!) is that
ActiveX components are native code, so they cannot be moved from one
platform to another. As to whether the iMac has ActiveX, I can't say.
I'm not aware of any Mac implementation, although strictly speaking
there's nothing to stop Microsoft creating an iMac version of ActiveX
(in the same way that they create Mac versions of Internet Explorer)
but that doesn't mean that components are interchangable between Mac
and PC.

Either way you are going to end up shipping platform specific binaries
as part of your app, to enable Java to interface with the native
ActiveX implementation in the given environment (assuming that isn't
just Windows.)
A quick Google reveals:
http://jakarta.apache.org/poi/


-FISH- ><>
 
M

Mark Preston

Dan said:
To be honest I dont know a lot about ActiveX, are you saying that
ActiveX is a windows only technology?

Well - errr - yes. Strictly speaking, its a *Microsoft* only one, but it
amounts to much the same thing.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top