my dog learned polymorphism*
The moose likes Java in General and the fly likes JNI question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "JNI question" Watch "JNI question" New topic

JNI question

Frank Hale
Ranch Hand

Joined: Mar 25, 2000
Posts: 230
Lets say I have the following C code:

How can I call this from Java using JNI. More specifically how do I represent the structure myStruct in the java code? What about the pointer that this function takes, how do I deal with that? I wanna write a wrapper using JNI for a C library and it has plenty of situations like the one I mention above.
I'm using JDK 1.3

I agree. Here's the link:
subject: JNI question
Similar Threads
JNI crashes calling into C methods with structs
JNI mapping pointer to C++ structures to the java side (Really
JNI - how do I access a C strucure from Java?
C++ to Java communication for Game Server
How to implement Data Structure with custom methods