I'm want to write a gui using java and then use JNI to interface the gui with c++ code. How is the c++ code treated? Is it treated as part of the java code? Does the c++ code run on it's own stack or does it run on the same stack that the java code is running on? Will the c++ code be able to store and retreive it's own data structures?