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

Discussion in 'Java' started by Jonathan Belson, Apr 18, 2005.

  1. 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
     
    Jonathan Belson, Apr 18, 2005
    #1
    1. Advertising

  2. 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.
     
    Abrasive Sponge, Apr 18, 2005
    #2
    1. Advertising

  3. 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
     
    Jonathan Belson, Apr 19, 2005
    #3
  4. 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('$','@')
     
    Thomas Fritsch, Apr 19, 2005
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Scott McPhillips
    Replies:
    0
    Views:
    400
    Scott McPhillips
    Jul 5, 2003
  2. ringos75
    Replies:
    0
    Views:
    1,000
    ringos75
    Apr 14, 2005
  3. davout
    Replies:
    0
    Views:
    333
    davout
    Aug 4, 2004
  4. Dobedani
    Replies:
    4
    Views:
    1,434
    Dobedani
    Sep 13, 2006
  5. yopwojtek

    Derive from MFC DLL to MFC APP

    yopwojtek, Aug 6, 2005, in forum: C++
    Replies:
    1
    Views:
    404
    Alf P. Steinbach
    Aug 6, 2005
Loading...

Share This Page