#include
#include
JNIEnv* create_vm() {
JavaVM* jvm;
JNIEnv* env;
JavaVMInitArgs args;
JavaVMOption options[1];
I noticed the different ways of implementing in C and C++ but I think I am writing it correctly.
You are using the C
variant, but are compiling with g++
, which invokes the C++
compiler (even if your source file has a .c
extension).
Either change the C
variants like
(*env)->FindClass(env, ...)
to the C++
variants, like
env->FindClass(...)
or switch your compiler to gcc
to compile the source as C
code.