This is a code generator that generates a C shim class that can be called from C to invoke Java. The shim code is based on the Java Native Interface (JNI). It can start a Java Virtual Machine (JVM) and invoke methods in a Java class. The tool was developed to simplify writing hybrid Java/C applications that have a C-based "main".
The generated shim:
- Handles starting/stopping a Java virtual machine (JVM)
- Has one method for each static method in the corresponding Java class. Only public static class methods are handled. All the exposed methods should be in a single Java class.
- Converts method arguments and return values to/from Java (for certain types)
- Creates intermediate and return arrays and buffers as needed
- Can prepend a specified prefix to generated method names to avoid name conflicts with other parts of the C source.