title: Trouble with Date in JNI
body: <p>I need to pass Java Date argument to a Java method from my C++ project using JNI.</p>
  
  <pre><code>jclass date = env-&gt;FindClass("java/util/Date");
  if (env-&gt;ExceptionCheck()){
    cout &lt;&lt; "Fail:";
  }
  jmethodID dateTypeConstructor= env-&gt;GetMethodID(date, "&lt;init&gt;", "()V");
  if(dateTypeConstructor == nullptr){
    cout &lt;&lt; "Fail:";
  }
  jobject dateObjectStart = env-&gt;NewObject(date, dateTypeConstructor);
  if(dateObjectStart  == nullptr){
    cout &lt;&lt; "Fail:";
  }
  long a = env-&gt;CallLongMethod(dateObjectStart,gettIME);
  </code></pre>
  
  <p>Through Debugging i take the value of <code>a</code> which is <code>582106004</code> . This value is the msec that have passed since 1 January 1970.
  The same code, instantiating a Date object and getting the time, in Java gives me the value <code>1400741921774</code> that is the correct one.</p>
  
  <p>Why is this happening? I am suspescting problem with JDK because in my C++/JNI project i ma using JDK 1.8 while Java/util/Date is a bit Deprecated.</p>