Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Awkward question regarding JNI

Shyam Purkayastha
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends
i have got a piculiar question regarding jni.i am a newbie in jni and have tried basic programs from the sun java tutorial.It really worked.
I understand that the method has to be defined as native and the corrosponding code has to be written in c and created into a library file.But whatever examples i have seen uptil now have involved calling only individual methods.Suppose that i have a C++ class library which i want to use in a java program.Obviously it is better to call the library using jni than to create the java equvalent of the library.I want to know wheather it is possible to call c++ objects and their corrosponding methods using jni and if yes then how.
I tried this concept by creating a small class and making objects of it inside a native method but my visual c++ compiler is giving all sorts of errors.Can anybody help.
Hey cool! They got a blimp! But I have a tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!