Embedding a JFrame into a Win32 C++ application

Posted on 2004-11-02
Last Modified: 2010-04-01
Greetings.  I'm new to the world of JNI, and I'm also relatively new to the world of MFC.  I have a java swing program that is a JFrame and I'd like to embed this frame into a legacy C++ application built using MFC.  Can anyone point me to a good example or tutorial of this, or provide some code snippets that might get me on the right path?

Thanks in advance,
Question by:slikrik98
    LVL 2

    Expert Comment


    Author Comment

    I had actually already tried that sample.  It compiled fine, however it crashes when i try to run it.  I've set the "JAVA_HOME" environment variable to my j2sdk1.4.2_04/jre/bin folder... is that correct?

    LVL 2

    Accepted Solution

    Try to set:


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
    Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
    The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
    The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

    934 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now