title: loading more than one dll in the same project with jni
body: <p>I have project cli c++ that i need it in java so i'm using jni to access to these methods,  and it's fine with a sample project that is have no dll references but when i include any other dll the jre crashed,</p>
  
  <p>for more detail i have this example:</p>
  
  <p>test is the first cli c++ project that is using dllNet and i use i in my java project:</p>
  
  <p>test code:</p>
  
  <pre><code>using namespace dllNet;
  JNIEXPORT jstring JNICALL Java_alquasar_aimetis_AimetisCallJNI_getAllCameras
  (JNIEnv *env, jclass cls, jobject srv, jobject cams){
  dllNet::Class1::SayHi();
  return env-&gt;NewStringUTF( "Hello, World!" );
  }
  </code></pre>
  
  <p>dllNet code:</p>
  
  <pre><code>using System;
  
  namespace dllNet
  {
      public class Class1
      {
          public static void SayHi()
          {
              System.Console.WriteLine("Hiiiiiiiiiiiiiiiiii .....");
          }
      }
  }
  </code></pre>
  
  <p>java code:</p>
  
  <pre><code>public class AimetisCallJNI {
  
      static{
                  System.load("C:/Users/alquasar/Desktop/mejdi/Aimetis/bin/dllNet.dll");
          System.load("C:/Users/alquasar/Desktop/mejdi/Aimetis/bin/test.dll");
      }
  public static native String getAllCameras(ServerAis srv, CamerasAis list);
  public static void main(String[] args) {
          ServerAis srv = new ServerAis("192.168.0.42", "admin", "admin");
          CamerasAis list = new CamerasAis();
  new AimetisCallJNI().getAllCameras(srv, list);
  }
  </code></pre>
  
  <p>and this is th error:</p>
  
  <pre><code> A fatal error has been detected by the Java Runtime Environment:
  #
  #  Internal Error (0xe0434f4d), pid=4956, tid=4732
  #
  # JRE version: 6.0_37-b06
  # Java VM: Java HotSpot(TM) Client VM (20.12-b01 mixed mode, sharing windows-x86 )
  # Problematic frame:
  # C  [KERNELBASE.dll+0xc6e3]
  #
  # An error report file with more information is saved as:
  # C:\Users\alquasar\workspaceMejdi\tn.waycon.alquasar.video.aimetis.impl\hs_err_pid4956.log
  #
  # If you would like to submit a bug report, please visit:
  #   http://java.sun.com/webapps/bugreport/crash.jsp
  # The crash happened outside the Java Virtual Machine in native code.
  # See problematic frame for where to report the bug.
  #
  </code></pre>