Wrapping a C++ library with JNI

I want to call the opensource MATIEC Compiler from my Java program.I have seen a lot of tutorials related to JNI(Java Native Interface) but all the examples and tutorial only deal with very simple HelloWorld programs.I want to know that for the large code like MATIEC Compiler how I can access that program from java?
I have tried the JNI tutorial and I understand this example completely.But I am confused in how to deal a large source code file.