Summary |  Admin |  Home Page |  Forums |  Tracker |  Bugs |  Support |  Patches |  Lists |  Tasks |  Docs |  C++ doc |  Java doc |  Surveys |  News |  CVS |  Files | 

org.jsesoft.jse: A Java support environment for C++ libraries.

Title: A Java support environment for C++ libraries.
Author: JSESoft
Company: JSESoft
Description: The project "Java Support Environment For C++ Libraries" aims at moving existing C++ libraries from the C++ to the Java culture. This is done step by step with the help of several generators.

The technique used by the Java support environment for C++ libraries is applicable for a broad range of C++ libraries. However, rather than aiming at a general solution (which harldy exists), org.jsesoft.jse tries to offer practical ways for concrete libraries. To demonstrate this with a fairly generic and working example, the jsegl library is introduced.

The jsegl is a C++ library used in a handful of projects at JSESoft Ltd. for bridging the gap between Java and C++. Since it has proven its usefulness not only as a demo, but as a real world tool, it got included into org.jsesoft.jse. All steps below use jsegl as an example, though they apply to much more C++ libraries.

  1. Swig's XML module is used to generate XML from the libraries' C++ header files.
  2. The generated XML representation of the C++ headers is parsed by a handful of XSLT stylesheets to generate
    • the delegate classes managing bookkeeping for calls from Java to C++
    • the alias classes managing bookkeeping for virtual function calls from C++ to Java
    • Java adapter classes with native functions for the C++ library
    • the JNI support code for native functions of the Java adapter classes
  3. An additional XML repository (actually UML XMI) is used together with the XML representation by some more XSLT stylsheets to generate advanced Java support for the C++ lib, e.g.
    • JavaBeans and Event Listeners
    • RMI Client/Server
    • JavaHelp
  4. An enterprise XML repository is used together with the other XML files by just more XSLT stylesheets to generate enterprise Java support for the C++ lib, e.g.
    • JDBC
    • Servlets, JSP
    • EnterpriseBeans
    • JMX
    • Jini

The generation process is demonstrated by the example of the C++ lib jsegl, a generic library for an entire range of connection based C++ libraries (e.g. electronic stock exchange, messaging, database access, etc.) . The jsegl is included in the "Java Support Environment For C++ Libraries".

Copyright: (c) 2002,2003 JSESoft

Hosted by SourceForge Logo