Generating the Shim

The generator is implemented as a Java annotation processor that runs "under" javac. A *nix shell script, gen.sh , is included to facilitate running this. The script can be invoked as follows:

Command line syntax

    
./gen.sh <paramerters>  <javaClassFQN>

arguments
-sourcepath <path>
The input root directory for the Java source.
-classpath <path>
The path to resolve classes. Note that since the input Java source has annotations the classpath should include cToJavaShimGenerator.jar (which has the annotations).
-Aoutputdir=<path>
The output directory for the generated .c and .h files.
<javaClassFQN>
is the fully qualified, dot-concatenated Java class name.

Example

There is an example Java class provided in the download. The example shim can be generated using the shell script exampleCmdLine.sh. The script just executes the following command line:
    
./gen.sh -sourcepath example -Aoutputdir=example -classpath cToJavaShimGenerator.jar  test.TestClass

    


Nazario Irizarry, Jr.
n_irizarry (at) users (dot) sourceforge (dot) net
© 2013 The MITRE Corporation. All Rights Reserved.
Approved for Public Release: 13-2602. Distribution Unlimited.