[Q] Embedding C++/MFC app into java application

J

Jonathan Belson

Hiya

I need to embed a application written with C++/MFC into a java
application. The standard approach seems to involve turning the MFC app
into an ActiveX control, then embedding that control into e.g. a java
Canvas.

The problem I have is that I can't use ActiveX on this project (security
concerns) - are there any other approaches to embedding I could try?

Regards,

--Jon
 
A

Abrasive Sponge

Jonathan said:
Hiya

I need to embed a application written with C++/MFC into a java
application. The standard approach seems to involve turning the MFC app
into an ActiveX control, then embedding that control into e.g. a java
Canvas.

The problem I have is that I can't use ActiveX on this project (security
concerns) - are there any other approaches to embedding I could try?

Regards,

--Jon

JNI - but there are security concerns with that as well.
 
J

Jonathan Belson

Abrasive said:
Jonathan Belson wrote:
JNI - but there are security concerns with that as well.

I know JNI would let me call C++ functions, but I need to be able to
display a GUI too (which uses DirectX) - can you do this with JNI? If
so, could you point me towards any sources of more information on doing
this? I've had a search, but haven't come up with anything that doesn't
involve ActiveX.

Regards,

--Jon
 
T

Thomas Fritsch

Jonathan said:
I know JNI would let me call C++ functions, but I need to be able to
display a GUI too (which uses DirectX) - can you do this with JNI? If
so, could you point me towards any sources of more information on doing
this? I've had a search, but haven't come up with anything that doesn't
involve ActiveX.

Regards,

--Jon
May be the "AWT Native Interface", which is part of the JNI, meets your
requirements. See
<http://java.sun.com/j2se/1.4.2/docs/guide/jni/index.html> and follow
the link to "AWT Native Interface". As far as I understand, this API is
well-suited for implementing Java "paint(Graphics)" methods in C/C++
either on Microsoft/Windows or Solaris/X11 with full access to the
native drawing surface. See especially the Win32-part of
<http://java.sun.com/j2se/1.4.2/docs/guide/awt/1.3/AWT_Native_Interface.html>
 

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

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top