This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes JNI - how do I access a C strucure from Java? 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 - how do I access a C strucure from Java?" Watch "JNI - how do I access a C strucure from Java?" New topic
Author

JNI - how do I access a C strucure from Java?

Frank Hale
Ranch Hand

Joined: Mar 25, 2000
Posts: 230
Supposing I had a C structure like

How can I access this from Java. I've read tutorials on JNI but they mostly just do a Hello,World style example. They never mention real world stuff. What I am going to do once I learn enough about JNI is write a wrapper around a C library so that I can access it from Java. This library has alot of structures so I need to know how to represent them in Java so that I can use them.
Thanks,
Frank
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: JNI - how do I access a C strucure from Java?
 
Similar Threads
JNI - using native data types in java code
JNI and MultiByte Character
JNI question
Java native methods, somebody please help
Java/C++ and JNI question