• Post Reply Bookmark Topic Watch Topic
  • New Topic

JNI Calls  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was writing a c dll for an java application.

I have to assign a double value to a jdoubleArray .

JNIEXPORT void JNICALL Java_com_MethordA (JNIEnv *env, jobject obj, jstring s, jstring s1, jdoubleArray deltaG)
{
double dV = 45.0;
// I have to assign a double value to deltaG[0]
deltaG[0] = dV;
}
 
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All java objects, of which jdoubleArray is one, is to be manipulated via the JNIEnv variable. Take a look at the JNI docs for the SetDoubleArrayRegion() function.

Henry
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!