I have a MFC based desktop application. Application is whole written in MFC so it is not cross platform compatible Hence i need to make it cross compatible. I thought to convert GUI part into java (swing) for cross compatibility and make dll or .so file by separating and wrapping pure cpp logic and access it through JNI/JNA so can any one help me how to separate gui part and logic in MFC based application so that i can make GUI in the java ? I don`t have deeper knowledge in MFC.
MFC based applications do not necessarily have a clean separation between the GUI and the program logic. MFC arranges calls into the functions on C++ classes, and those classes can contain not only GUI handling but all of the application logic. People don't always write MFC apps with a crystal ball telling them that someone will want the GUI parts in Java while keeping the rest.
Sorry, your question is not really of the kind for which you can get specific in this kind of forum which will resolve the challenge you are facing. You have to study the MFC app from the inside and out, take it apart and do the best you can. It could take quite a bit of effort and could end up in a total rewrite (with the logic ending up in Java also).
Stack Overflow works best when you have something concrete, like an example piece of code which is failing or needs to be transformed into doing something else, etc.