title: Properly returning a hardcoded byte[] from JNI to Java
body: <p>I want to hardcode a 16 byte array in JNI and return it with a method.</p>
  <p>This isn't working</p>
  <pre><code>static jbyteArray JNICALL getKeyBytes(JNIEnv *env, jobject thiz) 
  {
      F_LOG;
      Mutex::Autolock _m(sLock);
  
  
      jbyteArray result;  
      jbyte* resultType = new jbyte[16];  
      result = (*env)-&gt;NewByteArray(env, 16);  //line 214
      resultType = {52, 14, 25, 32, 75, 83, 35, 89, 40, 69, 35, 73, 84, 82, 35, 30};
      (*env)-&gt;SetByteArrayRegion(env, result, 0, 16, resultType);
      delete [] resultType;
  
      return result;
  }
  </code></pre>
  <p>I get the following errors</p>
  <blockquote>
  <p>NativeCodeCaller.cpp:214:17: error: base operand of '-&gt;' has non-pointer type '_JNIEnv'</p>
  <p>NativeCodeCaller.cpp:215:78: warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x</p>
  <p>NativeCodeCaller.cpp:215:78: error: cannot convert &quot;brace-enclosed initializer list&gt;&quot; to 'jbyte*' in assignment</p>
  <p>NativeCodeCaller.cpp:216:8: error: base operand of '-&gt;' has non-pointer type '_JNIEnv'</p>
  </blockquote>
  <p>any quick help? :)</p>