• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JNI Calls

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic