Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java native methods, somebody please help

 
Frank Hale
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can somebody tell me how I can map a C structure to a Java object? What happens when there are pointers in the C structure. How do I map those?
I keep digging on the net but keep on finding those useless HelloWorld JNI examples. Is there any hopes to find a decent real world example of how to map legacy C code to java.
I wanna create a JNI binding to the a C library which is heavy with structures. I need to know how to map a Java class to a C structure.
Thanks,
Frank
 
Stephanie Grasson
Ranch Hand
Posts: 347
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have found the book
"The Java Native Interface: Programmer's Guide and Specification" by Sheng Liang to be pretty useful.
It is from "The Java Series" from Sun.
ISBN# 0-201-32577-2.
Hope this helps.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic