Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 785 Bytes

README.md

File metadata and controls

33 lines (22 loc) · 785 Bytes

j2n

Description

Generates C++/JNI wrapper from Java archive file (.jar).

Installation

go get github.com/mtojo/j2n

Usage

j2n -i file

Options:

-i <file>      input jar file
-o <dir>       output directory; same as input if not specify
-f             overwrite output directory if already exists
-x <ext>       header file extension (default: .hpp)
-c <ext>       source file extension (default: .cpp)
-p <prefix>    macro prefix
-s <suffix>    macro suffix
-n <namespace> namespace prefix
-t <file>      header template file
-u <file>      source template file
-l <string>    .clang-format file

Example

Generates from Android SDK:

$ j2n -i $ANDROID_SDK_ROOT/platforms/android-21/android.jar -o android-sdk