

SWIG wraps C/C++ code using Java proxy classes and is very useful if you want to have access to large amounts of C/C++ code from Java. It is different to using the 'javah' tool as SWIG will wrap existing C/C++ code, whereas javah takes 'native' Java function declarations and creates C/C++ function prototypes. The Java extension to SWIG makes it very easy to plumb in existing C/C++ code for access from Java, as SWIG writes the Java Native Interface (JNI) code for you. Want to take advantage of Java but are forced into using some native (C/C++) code. The 100% Pure Java effort is a commendable concept, however in the real world programmers often either need to re-use their existing code or in some situations It covers most SWIG features, but certain low-level details are covered in less depth than in earlier chapters. This chapter describes SWIG's support of Java.


