I created a C++ class that is supposed to call Main.main by following: http://docs.oracle.com/javase/7/docs/technotes/guides/jni/spec/invocation.html#wp9502.
Main.main
jclass MainClass = env->FindClass("loader.Main");
This is wrong. You have to use slashes instead of dots when using JNI functions, just like in method signatures.
The correct code is:
jclass MainClass = env->FindClass("loader/Main");