This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Java in General and the fly likes MFC Dll in Java application Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "MFC Dll in Java application" Watch "MFC Dll in Java application" New topic
Author

MFC Dll in Java application

Joe Schaffer
Greenhorn

Joined: Mar 24, 2004
Posts: 29
Hi everybody,

I have a quite simple question: Is it possible to implement an MFC Dll into a Java application?

Joe
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Not directly. Java can call out to C or C++ modules that are specially written to know how to interact with Java. Google for tutorials on the Java Native Interface, also known as JNI. You could write native methods that call a special C module that calls the MFC libraries.

This is the price we pay for platform portability. Java does not know how to do OS specific things, like call out to native programs. When you write JNI you give up portability. Mostly. I think.


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: MFC Dll in Java application
 
Similar Threads
A tough one...marrying Java and MFC...GUI related.
MFC Serialize
WA #1.....word association
Get Serial number of exernal hard disk/Thumbdrive using java code &work for both linux and windows
Use a .dll file.