Created
February 15, 2017 14:53
-
-
Save matiasinsaurralde/bc80056a93df46594789b28fb06ef08b to your computer and use it in GitHub Desktop.
jni
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <jni.h> | |
int main( int args, char** argv ) { | |
JavaVM* jvm; | |
JNIEnv* env; | |
JavaVMInitArgs vmArgs; | |
JavaVMOption options[1]; int n = 0; | |
options[n++].optionString = "-Djava.class.path=."; | |
vmArgs.version = JNI_VERSION_1_6; | |
vmArgs.nOptions = n; | |
vmArgs.options = options; | |
// vmArgs.ignoreUnrecognized = false; | |
JNI_CreateJavaVM(&jvm, (void**)&env, &vmArgs); | |
jvm->DestroyJavaVM(); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment