Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > [Q] Embedding C++/MFC app into java application

Reply
Thread Tools

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

 
 
Jonathan Belson
Guest
Posts: n/a
 
      04-18-2005
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
 
Reply With Quote
 
 
 
 
Abrasive Sponge
Guest
Posts: n/a
 
      04-18-2005
Jonathan Belson wrote:
> 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.

 
Reply With Quote
 
 
 
 
Jonathan Belson
Guest
Posts: n/a
 
      04-19-2005
Abrasive Sponge wrote:
> Jonathan Belson wrote:


>> 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?


> 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
 
Reply With Quote
 
Thomas Fritsch
Guest
Posts: n/a
 
      04-19-2005
Jonathan Belson schrieb:
> Abrasive Sponge wrote:
>
>> Jonathan Belson wrote:

>
>
>>> 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?

>
>
>> 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

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>

--
"Thomas:Fritsch$ops:de".replace(':','.').replace(' $','@')

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Embedding an html application into a static html page jeff_j_dunlap@yahoo.com HTML 5 01-09-2008 04:49 PM
Embedding Ruby into a Borland C++ Builder Application Mohit Sindhwani Ruby 10 01-03-2008 04:39 PM
Lightweight embedding of Firefox Gecko into application whose toplevel is Python--possible? Kenneth McDonald Python 0 12-19-2006 05:20 AM
Embedding a database into a Java web start application Dobedani Java 4 09-13-2006 07:53 AM
newbie question: embedding Python into a C++ app and calling app functions davout Python 0 08-04-2004 03:26 PM



Advertisments