20-CS-694 Advanced Programming Techniques Spring 2012
JNI

Interfaces, Exceptions, Graphics, Animation, Threads, Reflection, Networking, RMI, JDBC, JNI

All lectures
Java Native Interface

Demonstration of mixing Java code with C++ code (the Java Native Interface).
Uses System.load(".../libnative.so") to load a C library named libnative.so that the Java code can link to.

Here is all the code:

Main.java (the applet, shows all the results returned to Java)
native.cc (the C code: the computable functions - prints to the console)
Makefile (the Makefile)
main.html (the applet file)

Here is some documentation:

JNI include
JNI Types

To run: download all files, type make, then type appletviewer main.html