title: Access single DLL from multiple classes
body: <p>I'm relatively new to Java, and as such am very new to JNI and C++. Is it possible to access the same dynamic library over multiple classes? For instance, if in my C++, I had a class that in turn had two children classes, would I be able to access the child classes from two Java classes?</p>
  
  <p>For example, in foo.h:</p>
  
  <pre><code>class Controller {
      public:
          class A {
              public:
                  int someMethod();
          }
          class B {
              public:
                  int someOtherMethod();
          }
  }
  </code></pre>
  
  <p>and in A.java:</p>
  
  <pre><code>class A {
      static {
          System.loadLibrary("foo");
      }
      public native int someMethod();
  }
  </code></pre>
  
  <p>with B.java: </p>
  
  <pre><code>class B {
      static {
          System.loadLibrary("foo");
      }
      public native int someOtherMethod();
  }
  </code></pre>
  
  <p>Would this be possible? and if so, how would I go about doing it?</p>