title: Failed to write core dump. Minidumps are not enabled by default on client versions of Windows, while callin dll from java
body: <p>I am calling a DLL (compiled with GCC) through Java, using JDK 1.7.0_40 on Windows 7. I had copied the generated <code>hello.dll</code> to my <code>java/bin</code> directory and am executing <code>HelloJNI.java</code> from the console.</p>
  
  <p>I am recieving this error:</p>
  
  <pre><code>#
  # A fatal error has been detected by the Java Runtime Environment:
  #
  #  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x610d70b4, pid=1956, tid=3960
  #
  # JRE version: Java(TM) SE Runtime Environment (7.0_40-b43) (build 1.7.0_40-b43)
  # Java VM: Java HotSpot(TM) Client VM (24.0-b56 mixed mode, sharing windows-x86 )
  # Problematic frame:
  # C  [cygwin1.dll+0xd70b4]
  #
  # Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
  #
  # An error report file with more information is saved as:
  # D:\workspace\HelloJNI\hs_err_pid1956.log
  #
  # If you would like to submit a bug report, please visit:
  #   http://bugreport.sun.com/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>
  
  <p>My header file, generated with <code>java -jni HelloJNI</code>:</p>
  
  <pre class="lang-c prettyprint-override"><code>/* DO NOT EDIT THIS FILE - it is machine generated */
  #include &lt;jni.h&gt;
  /* Header for class HelloJNI */
  
  #ifndef _Included_HelloJNI
  #define _Included_HelloJNI
  #ifdef __cplusplus
  extern "C" {
  #endif
  /*
   * Class:     HelloJNI
   * Method:    sayHello
   * Signature: ()V
   */
  JNIEXPORT void JNICALL Java_HelloJNI_sayHello
    (JNIEnv *, jobject);
  
  #ifdef __cplusplus
  }
  #endif
  #endif
  </code></pre>
  
  <p>My C code, compiled with <code>gcc -Wl,--add-stdcall-alias -I"d:\Program Files\Java\jdk1.7.0_40\include" -I"d:\Program Files\Java\jdk1.7.0_40\include\win32" -shared -o hello.dll HELLOJNI.c</code>:</p>
  
  <pre class="lang-c prettyprint-override"><code>#include &lt;jni.h&gt;
  #include &lt;stdio.h&gt;
  #include "HelloJNI.h"
  
  JNIEXPORT void JNICALL Java_HelloJNI_sayHello(JNIEnv *env,jobject thisObj) {
  printf("Hai Welcome");
  return;
  }
  </code></pre>